1
0
Fork 0
freesewing/markdown/dev/reference/api/svg/script/en.md
2022-02-19 08:04:25 +01:00

34 lines
522 B
Markdown

---
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>