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

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes ? Yes191 Yes Yes
height ? ? ? ? ? ?
rx ? ? ? ? ? ?
ry ? ? ? ? ? ?
width ? ? ? ? ? ?
x ? ? ? ? ? ?
y ? ? ? ? ? ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support ? Yes ? Yes1 Yes Yes ?
height ? ? ? ? ? ? ?
rx ? ? ? ? ? ? ?
ry ? ? ? ? ? ? ?
width ? ? ? ? ? ? ?
x ? ? ? ? ? ? ?
y ? ? ? ? ? ? ?

1. Only implements the SVG 1.1 specification of the interface.

See also

Document Tags and Contributors

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