Scripts
The attribute
contentScriptType
of the element
<svg>
specifies the default script language for all the scripts of the document
Without this attribute, the default script language can be given by the HTTP header :
Content-Script-Type
Without both, the default script language is ECMAScript ( Javascript )
Example :
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG December 1999//EN"
"http://www.w3.org/Graphics/SVG/SVG-19991203.dtd">
<svg width="4in" height="3in">
<defs>
<script><![CDATA[
/* Beep on mouseclick */
MouseClickHandler() { beep(); }
]]>
</script>
</defs>
<circle onclick="MouseClickHandler()" r="85"/>
</svg>
Didier Courtaud
The SVG language
Novembre 2001
65 / 74