SVGGeometryElement.pathLength

The SVGGeometryElement.pathLength property reflects the pathLength attribute and returns the total length of the path, in user units.

Syntax

var pathLength = someElement.pathLength;

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
pathLength
57
1-57
Only supported for SVGPathElement, not all SVGGeometryElement objects.
79
61
1.5-61
Only supported for SVGPathElement, not all SVGGeometryElement objects.
No
44
≤12.1-44
Only supported for SVGPathElement, not all SVGGeometryElement objects.
12
3-12
Only supported for SVGPathElement, not all SVGGeometryElement objects.
57
≤37-57
Only supported for SVGPathElement, not all SVGGeometryElement objects.
57
18-57
Only supported for SVGPathElement, not all SVGGeometryElement objects.
61
4-61
Only supported for SVGPathElement, not all SVGGeometryElement objects.
43
≤12.1-43
Only supported for SVGPathElement, not all SVGGeometryElement objects.
12
1-12
Only supported for SVGPathElement, not all SVGGeometryElement objects.
7.0
1.0-7.0
Only supported for SVGPathElement, not all SVGGeometryElement objects.

© 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/SVGGeometryElement/pathLength