The script element indicate links to a client-side language.
svgwrite.container.Script
svgwrite.container.Script.__init__
svgwrite.container.Script.append
Best place for the script element is the defs attribute of the ~svgwrite.drawing.Drawing
class:
drawing.defs.add(drawing.script('script-content'))
svgwrite.base.BaseElement
type -- string
Identifies the scripting language for the given script element. The value content-type specifies a media type, per MIME. If a type is not provided, the value of contentScriptType on the svg element shall be used, which in turn defaults to
'application/ecmascript'
. If a script element falls outside of the outermost svg element and the type is not provided, the type must default to'application/ecmascript'
externalResourcesRequired -- bool
False: if document rendering can proceed even if external resources are unavailable else: True
- xlink:href -- string -- href parameter
- xlink:show --
'new|replace'
xlink:acuate --
'onRequest'
This attribute provides documentation to XLink-aware processors that an application should traverse from the starting resource to the ending resource only on a post-loading event triggered for the purpose of traversal.
Core Attributes </attributes/core>
Conditional Processing Attributes </attributes/conditional_processing>
Graphical Event Attributes </attributes/graphical_event>
Presentation Attributes </attributes/presentation>
XLink Attributes </attributes/xlink>