getTotalLength()

Deprecated
This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Avoid using it and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

The SVGPathElement.getTotalLength() method returns the user agent's computed value for the total length of the path in user units.

Note: In SVG 2 this method was moved to the SVGGeometryElement interface, from which the SVGPathElement inherits it.

Syntax

float someElement.getTotalLength();

Return value

A float indicating the total length of the path in user units.

Specifications

Specification Status Comment
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of 'SVGPathElement.getTotalLength()' in that specification.
Recommendation Initial definition

Browser compatibility

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support (Yes)[1] 20 (12.10240) (Yes)
No support 53 (53)[2]
(Yes) (Yes) ?
Feature Android Android Webview Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support ? (Yes)[1] (Yes)[2]
No support 53.0 (53)[2]
? ? ? (Yes)[1]

[1] As required by the latest version of the spec., this property has been removed. 

[2] This method is currently only supported on <path> elements (where it was already supported in earlier Firefox versions through the SVGPathElement interface). Support for other elements will be added in bug 1325320.

See also

Document Tags and Contributors

 Contributors to this page: bunnybooboo, jpmedley, Sebastianz
 Last updated by: bunnybooboo,