requiredFeatures

This attribute takes a list of feature strings, with the individual strings separated by white space. It determines whether or not all of the named features are supported by the browser; if all of them are supported, the attribute evaluates to true end the element is rendered; otherwise, the attribute evaluates to false and the current element and its children are skipped and thus will not be rendered. This provides a way to design SVG that gracefully falls back when features aren't available.

If the attribute is not present, then its implicit evaluated value is true. If a null string or empty string value is given to attribute requiredFeatures, the attribute is evaluate to false.

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

Usage context

This is a list of feature strings, separated using white space. Determines whether all of the named features are supported by the browser. See Feature strings below for a list of allowed values.

Feature Strings

The following are the feature strings for the requiredFeatures attribute. These same feature strings apply to the hasFeature method call that is part of the SVG DOM's support for the DOMImplementation interface. In some cases the feature strings map directly to a set of attributes, properties or elements, in others they represent some functionality of the browser. Note that the format and naming for feature strings changed from SVG 1.0 to SVG 1.1. The SVG 1.0 feature strings are not listed here but can be found in the SVG Specification. Some browser support SVG 1.0 Feature strings for compatibility reasons. However, the SVG 1.0 feature strings are considered deprecated.

http://www.w3.org/TR/SVG11/feature#SVG

At least one of the following feature is supported:

http://www.w3.org/TR/SVG11/feature#SVG-static

http://www.w3.org/TR/SVG11/feature#SVG-animation

http://www.w3.org/TR/SVG11/feature#SVG-dynamic

http://www.w3.org/TR/SVG11/feature#SVGDOM

http://www.w3.org/TR/SVG11/feature#SVGDOM

At least one of the following feature is supported:

http://www.w3.org/TR/SVG11/feature#SVGDOM-static

http://www.w3.org/TR/SVG11/feature#SVGDOM-animation

http://www.w3.org/TR/SVG11/feature#SVGDOM-dynamic

http://www.w3.org/TR/SVG11/feature#SVG-static

The browser supports all the following features:

http://www.w3.org/TR/SVG11/feature#CoreAttribute

http://www.w3.org/TR/SVG11/feature#Structure

http://www.w3.org/TR/SVG11/feature#ContainerAttribute

http://www.w3.org/TR/SVG11/feature#ConditionalProcessing

http://www.w3.org/TR/SVG11/feature#Image

http://www.w3.org/TR/SVG11/feature#Style

http://www.w3.org/TR/SVG11/feature#ViewportAttribute

http://www.w3.org/TR/SVG11/feature#Shape

http://www.w3.org/TR/SVG11/feature#Text

http://www.w3.org/TR/SVG11/feature#PaintAttribute

http://www.w3.org/TR/SVG11/feature#OpacityAttribute

http://www.w3.org/TR/SVG11/feature#GraphicsAttribute

http://www.w3.org/TR/SVG11/feature#Marker

http://www.w3.org/TR/SVG11/feature#ColorProfile

http://www.w3.org/TR/SVG11/feature#Gradient

http://www.w3.org/TR/SVG11/feature#Pattern

http://www.w3.org/TR/SVG11/feature#Clip

http://www.w3.org/TR/SVG11/feature#Mask

http://www.w3.org/TR/SVG11/feature#Filter

http://www.w3.org/TR/SVG11/feature#XlinkAttribute

http://www.w3.org/TR/SVG11/feature#Font

http://www.w3.org/TR/SVG11/feature#Extensibility

http://www.w3.org/TR/SVG11/feature#SVGDOM-static

The browser supports all of the DOM interfaces and methods that correspond to the language features for http://www.w3.org/TR/SVG11/feature#SVG-static.

http://www.w3.org/TR/SVG11/feature#SVG-animation

The browser supports all of the language features from http://www.w3.org/TR/SVG11/feature#SVG-static plus the feature http://www.w3.org/TR/SVG11/feature#Animation.

http://www.w3.org/TR/SVG11/feature#SVGDOM-animation

The browser supports all of the DOM interfaces and methods that correspond to the language features for http://www.w3.org/TR/SVG11/feature#SVG-animation.

http://www.w3.org/TR/SVG11/feature#SVG-dynamic

The browser supports all of the language features from http://www.w3.org/TR/SVG11/feature#SVG-animation plus the following features:

http://www.w3.org/TR/SVG11/feature#Hyperlinking

http://www.w3.org/TR/SVG11/feature#Scripting

http://www.w3.org/TR/SVG11/feature#View

http://www.w3.org/TR/SVG11/feature#Cursor

http://www.w3.org/TR/SVG11/feature#GraphicalEventsAttribute

http://www.w3.org/TR/SVG11/feature#DocumentEventsAttribute

http://www.w3.org/TR/SVG11/feature#AnimationEventsAttribute

http://www.w3.org/TR/SVG11/feature#SVGDOM-dynamic

The browser supports all of the DOM interfaces and methods that correspond to the language features for http://www.w3.org/TR/SVG11/feature#SVG-dynamic.