This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
* Some parts of this feature may have varying levels of support.
The SVGGeometryElement interface represents SVG elements whose rendering is defined by geometry with an equivalent path, and which can be filled and stroked. This includes paths and the basic shapes.
This interface also inherits properties from its parent, SVGGraphicsElement.
SVGGeometryElement.pathLength Read only
This property reflects the pathLength attribute.
This interface also inherits methods from its parent, SVGGraphicsElement.
SVGGeometryElement.isPointInFill()Determines whether a given point is within the fill shape of an element. Normal hit testing rules apply; the value of the pointer-events property on the element determines whether a point is considered to be within the fill.
SVGGeometryElement.isPointInStroke()Determines whether a given point is within the stroke shape of an element. Normal hit testing rules apply; the value of the pointer-events property on the element determines whether a point is considered to be within the stroke.
SVGGeometryElement.getTotalLength()Returns the user agent's computed value for the total length of the path in user units.
SVGGeometryElement.getPointAtLength()Returns the point at a given distance along the path.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
SVGGeometryElement |
561–56TheSVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface. |
7912–79TheSVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface. |
531.5–53TheSVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface. |
43≤12.1–43TheSVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface. |
123–12TheSVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface. |
5618–56TheSVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface. |
534–53TheSVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface. |
43≤12.1–43TheSVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface. |
121–12TheSVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface. |
6.01.0–6.0TheSVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface. |
564.4–56TheSVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface. |
121–12TheSVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface. |
getPointAtLength |
56 | 79 | 61 | 43 | 12 | 56 | 61 | 43 | 12 | 6.0 | 56 | 12 |
getTotalLength |
56 | 79 | 61 | 43 | 12 | 56 | 61 | 43 | 12 | 6.0 | 56 | 12 |
isPointInFill |
33The element this method is called for must be in the DOM; otherwise, this method will always returnfalse. |
79The element this method is called for must be in the DOM; otherwise, this method will always returnfalse. |
69 | 20The element this method is called for must be in the DOM; otherwise, this method will always returnfalse. |
12 | 33The element this method is called for must be in the DOM; otherwise, this method will always returnfalse. |
79 | 20The element this method is called for must be in the DOM; otherwise, this method will always returnfalse. |
12 | 3.0 | 4.4.3The element this method is called for must be in the DOM; otherwise, this method will always returnfalse. |
12 |
isPointInStroke |
33The element this method is called for must be in the DOM; otherwise, this method will always returnfalse. |
79The element this method is called for must be in the DOM; otherwise, this method will always returnfalse. |
69 | 20The element this method is called for must be in the DOM; otherwise, this method will always returnfalse. |
12 | 33The element this method is called for must be in the DOM; otherwise, this method will always returnfalse. |
79 | 20The element this method is called for must be in the DOM; otherwise, this method will always returnfalse. |
12 | 3.0 | 4.4.3The element this method is called for must be in the DOM; otherwise, this method will always returnfalse. |
12 |
pathLength |
57 | 79 | 61 | 44 | 12 | 57 | 61 | 43 | 12 | 7.0 | 57 | 12 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement