The SVGPatternElement
interface corresponds to the <pattern>
element.
On this page
SVGPatternElement
Instance properties
This interface also inherits properties from its parent, SVGElement
and implements the ones from SVGFitToViewBox
.
SVGPatternElement.href
Read only-
An
SVGAnimatedString
corresponding to thehref
orxlink:href
Deprecated attribute of the given<pattern>
element. SVGPatternElement.patternUnits
Read only-
An
SVGAnimatedEnumeration
corresponding to thepatternUnits
attribute of the given<pattern>
element. Takes one of the constants defined inSVGUnitTypes
. SVGPatternElement.patternContentUnits
Read only-
An
SVGAnimatedEnumeration
corresponding to thepatternContentUnits
attribute of the given<pattern>
element. Takes one of the constants defined inSVGUnitTypes
. SVGPatternElement.patternTransform
Read only-
An
SVGAnimatedTransformList
corresponding to thepatternTransform
attribute of the given<pattern>
element. SVGPatternElement.x
Read only-
An
SVGAnimatedEnumeration
corresponding to thex
attribute of the given<pattern>
element. SVGPatternElement.y
Read only-
An
SVGAnimatedEnumeration
corresponding to they
attribute of the given<pattern>
element. SVGPatternElement.width
Read only-
An
SVGAnimatedEnumeration
corresponding to thewidth
attribute of the given<pattern>
element. SVGPatternElement.height
Read only-
An
SVGAnimatedEnumeration
corresponding to theheight
attribute of the given<pattern>
element.
Instance 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–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/SVGPatternElement