SVGRectElement

The SVGRectElement interface provides access to the properties of <rect> elements, as well as methods to manipulate them.

Properties

This interface also inherits properties from its parent, SVGGeometryElement.

SVGRectElement.x Read only
Returns an SVGAnimatedLength corresponding to the x attribute of the given <rect> element.
SVGRectElement.x Read only
Returns an SVGAnimatedLength corresponding to the x attribute of the given <rect> element.
SVGRectElement.y Read only
Returns an SVGAnimatedLength corresponding to the y attribute of the given <rect> element.
SVGRectElement.width Read only
Returns an SVGAnimatedLength corresponding to the width attribute of the given <rect> element.
SVGRectElement.height Read only
Returns an SVGAnimatedLength corresponding to the height attribute of the given <rect> element.
SVGRectElement.rx Read only
Returns an SVGAnimatedLength corresponding to the rx attribute of the given <rect> element.
SVGRectElement.ry Read only
Returns an SVGAnimatedLength corresponding to the ry attribute of the given <rect> element.

Methods

This interface doesn't implement any specific methods, but inherits methods from its parent, SVGGeometryElement.

Specifications

Specification Status Comment
Scalable Vector Graphics (SVG) 2
The definition of 'SVGRectElement' in that specification.
Candidate Recommendation Replaced the inheritance from SVGElementSVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGStylable, and SVGTransformable by SVGGeometryElement
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of 'SVGRectElement' in that specification.
Recommendation Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support YesEdge ? Firefox Full support Yes
Notes
Full support Yes
Notes
Notes Only implements the SVG 1.1 specification of the interface.
IE Full support 9
Notes
Full support 9
Notes
Notes Only implements the SVG 1.1 specification of the interface.
Opera Full support YesSafari Full support YesWebView Android ? Chrome Android Full support YesEdge Mobile ? Firefox Android Full support Yes
Notes
Full support Yes
Notes
Notes Only implements the SVG 1.1 specification of the interface.
Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?
heightChrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
rxChrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
ryChrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
widthChrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
xChrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
yChrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.

See also

Document Tags and Contributors

Contributors to this page: fscholz, Sebastianz, mattwojo, kscarfone, Sheppy, Jeremie
Last updated by: fscholz,