SVGStyleElement
SVG style interface
The SVGStyleElement interface corresponds to the SVG <style> element.
Properties
This interface also inherits properties from its parent interface, SVGElement.
SVGStyleElement.type-
A
DOMStringcorresponding to thetypeattribute of the given element.SVG 1.1 defined that a
DOMExceptionis raised with codeNO_MODIFICATION_ALLOWED_ERRon an attempt to change the value of a read-only attribute. This restriction was removed in SVG 2. SVGStyleElement.media-
A
DOMStringcorresponding to themediaattribute of the given element.SVG 1.1 defined that a
DOMExceptionis raised with codeNO_MODIFICATION_ALLOWED_ERRon an attempt to change the value of a read-only attribute. This restriction was removed in SVG 2. SVGStyleElement.title-
A
DOMStringcorresponding to thetitleattribute of the given element.SVG 1.1 defined that a
DOMExceptionis raised with codeNO_MODIFICATION_ALLOWED_ERRon an attempt to change the value of a read-only attribute. This restriction was removed in SVG 2.
Methods
This interface doesn't implement any specific methods, but inherits methods from its parent interface, SVGElement.
Specifications
Browser compatibility
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
SVGStyleElement |
1 |
12 |
1.5 |
9 |
≤12.1 |
3 |
≤37 |
18 |
4 |
≤12.1 |
1 |
1.0 |
media |
1 |
12 |
1.5 |
9 |
≤12.1 |
3 |
≤37 |
18 |
4 |
≤12.1 |
1 |
1.0 |
title |
1 |
12 |
1.5 |
9 |
≤12.1 |
3 |
≤37 |
18 |
4 |
≤12.1 |
1 |
1.0 |
type |
1 |
12 |
1.5 |
9 |
≤12.1 |
3 |
≤37 |
18 |
4 |
≤12.1 |
1 |
1.0 |
sheet |
1 |
12 |
1.5 |
9 |
≤12.1 |
3 |
≤37 |
18 |
4 |
≤12.1 |
1 |
1.0 |
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/SVGStyleElement