SVG stylable interface
The SVGStylable
interface is implemented on all objects corresponding to SVG elements that can have {{ SVGAttr("style") }}, {{SVGAttr("class") and presentation attributes specified on them.
Interface overview
Also implement | None |
Methods | - {{ domxref("CSSValue") }}
getPresentationAttribute(in {{ domxref("DOMString") }} name) |
Properties | - readonly {{ domxref("SVGAnimatedString") }}
className - readonly {{ domxref("CSSStyleDeclaration") }}
style |
Normative document | SVG 1.1 (2nd Edition) |
Properties
Name | Type | Description |
className | {{ domxref("SVGAnimatedString") }} | Corresponds to attribute {{ SVGAttr("class") }} on the given element. |
style | {{ domxref("CSSStyleDeclaration") }} | Corresponds to attribute {{ SVGAttr("style") }} on the given element. |
Methods
Name & Arguments | Return | Description |
getPresentationAttribute(in {{ domxref("DOMString") }} name) | {{ domxref("CSSValue") }} | Returns the base (i.e., static) value of a given presentation attribute as an object of type {{ domxref("CSSValue") }}. The returned object is live; changes to the objects represent immediate changes to the objects to which the {{ domxref("CSSValue") }} is attached. |
Browser compatibility
{{ CompatibilityTable() }}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
Basic support | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
Basic support | {{ CompatNo() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} |