wip: Working on better developer docs
This commit is contained in:
parent
c16b212bb9
commit
e0a261731f
25 changed files with 461 additions and 152 deletions
32
markdown/dev/reference/api/svg/script/en.md
Normal file
32
markdown/dev/reference/api/svg/script/en.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
title: script
|
||||
---
|
||||
|
||||
A string that will be rendered as the script section of the SVG document.
|
||||
|
||||
We don't use this ourselves, but it's there if you need it.
|
||||
|
||||
```svg
|
||||
<script type="text/javascript">
|
||||
/* svg.script will be inserted */
|
||||
</scripts>
|
||||
```
|
||||
|
||||
<Warning>
|
||||
|
||||
###### Add, but don't overwrite
|
||||
When adding your own script, it's important not to
|
||||
overwrite this property, but rather add your own.
|
||||
|
||||
In other words, do this:
|
||||
|
||||
```js
|
||||
svg.script += myScript;
|
||||
```
|
||||
and don't do this:
|
||||
|
||||
```js
|
||||
svg.script = myScript;
|
||||
```
|
||||
|
||||
</Warning>
|
Loading…
Add table
Add a link
Reference in a new issue