requiredExtensions

The requiredExtensions attribute defines a list of required language extensions. Language extensions are capabilities within a user agent that go beyond the feature set defined in this specification. Each extension is identified by an URL reference.

Usage notes

Value <list-of-extensions>
Default value None
Animatable No
<list-of-extensions>
The value is a list of references (IRI references in SVG 1, URL References in SVG 2) which identify the required extensions, with the individual values separated by white space. Determines whether all of the named extensions are supported by the user agent. If all of the given extensions are supported, then the attribute evaluates to true; otherwise, the current element and its children are skipped and thus will not be rendered.

Note: If a given extension reference contains white space within itself, that white space must be escaped.

requiredExtensions is often used in conjunction with the <switch> element. If the attribute is used in other situations, then it represents a simple switch on the given element whether to render the element or not.

Note: If several extension reference objects are enclosed in a <switch> and none of them matches, this may lead to situations where no content is displayed. It is thus recommended to include a "catch-all" choice at the end of such a <switch> which is acceptable in all cases.

If the attribute is not present, then it implicitly evaluates to "true". If a null string or empty string value is given, the attribute evaluates to "false".

The IRI names for the extension should include versioning information, such as "http://example.org/SVGExtensionXYZ/1.0", so that script writers can distinguish between different versions of a given extension.

Specifications

Specification Status Comment
Scalable Vector Graphics (SVG) 2
The definition of 'requiredExtensions' in that specification.
Candidate Recommendation IRIs replaced with URLs
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of 'requiredExtensions' in that specification.
Recommendation Initial definition

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
requiredExtensionsChrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Compatibility unknown
Compatibility unknown