dom / latest / svgpatternelement.html /

SVGPatternElement

The SVGPatternElement interface corresponds to the <pattern> element.

EventTarget Node Element SVGElement SVGPatternElement

Properties

This interface also inherits properties from its parent, SVGElement and implements the ones from SVGFitToViewBox.

SVGPatternElement.href Read only

An SVGAnimatedString corresponding to the href or xlink:href attribute of the given <pattern> element.

SVGPatternElement.patternUnits Read only

An SVGAnimatedEnumeration corresponding to the patternUnits attribute of the given <pattern> element. Takes one of the constants defined in SVGUnitTypes.

SVGPatternElement.patternContentUnits Read only

An SVGAnimatedEnumeration corresponding to the patternContentUnits attribute of the given <pattern> element. Takes one of the constants defined in SVGUnitTypes.

SVGPatternElement.patternTransform Read only

An SVGAnimatedTransformList corresponding to the patternTransform attribute of the given <pattern> element.

SVGPatternElement.x Read only

An SVGAnimatedEnumeration corresponding to the x attribute of the given <pattern> element.

SVGPatternElement.y Read only

An SVGAnimatedEnumeration corresponding to the y attribute of the given <pattern> element.

SVGPatternElement.width Read only

An SVGAnimatedEnumeration corresponding to the width attribute of the given <pattern> element.

SVGPatternElement.height Read only

An SVGAnimatedEnumeration corresponding to the height attribute of the given <pattern> element.

Methods

This interface doesn't implement any specific methods, but inherits methods from its parent interface, SVGElement and implements the ones from SVGFitToViewBox.

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
SVGPatternElement
1
12
3
9
≤12.1
3
3
18
4
≤12.1
1
1.0
height
1
12
3
9
≤12.1
3
3
18
4
≤12.1
1
1.0
href
1
12
3
9
≤12.1
3
3
18
4
≤12.1
1
1.0
patternContentUnits
1
12
3
9
≤12.1
3
3
18
4
≤12.1
1
1.0
patternTransform
1
12
3
9
≤12.1
3
3
18
4
≤12.1
1
1.0
patternUnits
1
12
3
9
≤12.1
3
3
18
4
≤12.1
1
1.0
preserveAspectRatio
1
12
3
9
≤12.1
3
3
18
4
≤12.1
1
1.0
viewBox
1
12
3
9
≤12.1
3
3
18
4
≤12.1
1
1.0
width
1
12
3
9
≤12.1
3
3
18
4
≤12.1
1
1.0
x
1
12
3
9
≤12.1
3
3
18
4
≤12.1
1
1.0
y
1
12
3
9
≤12.1
3
3
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/SVGPatternElement