Web/API/SVGUseElement

From Get docs


SVG use DOM interface

The SVGUseElement interface corresponds to the <use> element.

Properties

This interface also inherits properties from its parent interface, SVGGraphicsElement and implements properties from SVGURIReference.

SVGUseElement.x Read only
An SVGAnimatedLength corresponding to the x attribute of the given element.
SVGUseElement.y Read only
An SVGAnimatedLength corresponding to the y attribute of the given element.
SVGUseElement.width Read only
An SVGAnimatedLength corresponding to the width attribute of the given element.
SVGUseElement.height Read only
An SVGAnimatedLength corresponding to the height attribute of the given element.
SVGUseElement.instanceRoot Read only
An SVGElement corresponding to the instance root of the given element, which is a direct child of the elements shadow root. If the element does not have a shadow tree (for example, because its URI is invalid or because it has been disabled by conditional processing), then getting this attribute returns null.
SVGUseElement.animatedInstanceRoot Read only
An SVGElement corresponding to the instance root of the given element, which is a direct child of the elements shadow root. If the element does not have a shadow tree (for example, because its URI is invalid or because it has been disabled by conditional processing), then getting this attribute returns null.

Methods

This interface doesn't implement any specific methods, but inherits methods from its parent interface, SVGGraphicsElement and implements methods from SVGURIReference.

Specifications

Specification Status Comment
Scalable Vector Graphics (SVG) 2The definition of 'SVGUseElement' in that specification. Candidate Recommendation Redefined the properties instanceRoot and animatedInstanceRoot.
Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'SVGUseElement' in that specification. Recommendation Initial definition

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
SVGUseElement Chrome

Full support Yes

Edge

Full support 12

Firefox

Full support Yes

IE

?

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

animatedInstanceRoot Chrome

No support No

Edge

No support 12 — 79

Firefox

?

IE

?

Opera

?

Safari

?

WebView Android

No support No

Chrome Android

No support No

Firefox Android

?

Opera Android

?

Safari iOS

?

Samsung Internet Android

No support No

height Chrome

Full support Yes

Edge

Full support 12

Firefox

Full support Yes

IE

?

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

instanceRoot Chrome

No support No

Edge

No support 12 — 79

Firefox

?

IE

?

Opera

?

Safari

?

WebView Android

No support No

Chrome Android

No support No

Firefox Android

?

Opera Android

?

Safari iOS

?

Samsung Internet Android

No support No

width Chrome

Full support Yes

Edge

Full support 12

Firefox

Full support Yes

IE

?

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

x Chrome

Full support Yes

Edge

Full support 12

Firefox

Full support Yes

IE

?

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

y Chrome

Full support Yes

Edge

Full support 12

Firefox

Full support Yes

IE

?

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown


See also