SVGScriptElementBuilder class

SVGScriptElementBuilder class

Builder class for constructing an SVG ‘script’ element. The ‘script’ element is used to embed or reference executable scripts within SVG documents. This class provides methods to set various attributes specific to the ‘script’ element, such as type, source, and cross-origin settings.

The SVGScriptElementBuilder type exposes the following members:

Constructors

ConstructorDescription
initConstructs a new instance of SVGScriptElementBuilder

Methods

MethodDescription
build
build
typeSets the ’type’ attribute of the SVG ‘script’ element, specifying the scripting language type (e.g., “text/javascript”).
hrefSets the ‘href’ attribute of the SVG ‘script’ element, specifying the URL of an external script file.
crossoriginSets the ‘crossorigin’ attribute of the SVG ‘script’ element, specifying the CORS settings for the external script.
build_elementBuilds and returns an SVGElement instance based on the current configuration of the builder.
attributeSets or updates an attribute on an SVG element.

See Also