SVGPathElement

Baseline Widely available *

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 SVGPathElement interface corresponds to the <path> element.

EventTarget Node Element SVGElement SVGGraphicsElement SVGGeometryElement SVGPathElement

Note: In SVG 2 the getPathSegAtLength() and createSVGPathSeg* methods were removed and the pathLength property and the getTotalLength() and getPointAtLength() methods were moved to SVGGeometryElement.

Instance properties

This interface inherits properties from its parent, SVGGeometryElement.

Instance methods

This interface also inherits methods from its parent, SVGGeometryElement.

SVGPathElement.getPathSegAtLength() Deprecated

Returns an unsigned long representing the index within the pathSegList utilizing the user agent's distance-along-a-path algorithm.

SVGPathElement.createSVGPathSegClosePath() Deprecated

Returns a stand-alone, parentless SVGPathSegClosePath object.

SVGPathElement.createSVGPathSegMovetoAbs() Deprecated

Returns a stand-alone, parentless SVGPathSegMovetoAbs object.

SVGPathElement.createSVGPathSegMovetoRel() Deprecated

Returns a stand-alone, parentless SVGPathSegMovetoRel object.

SVGPathElement.createSVGPathSegLinetoAbs() Deprecated

Returns a stand-alone, parentless SVGPathSegLinetoAbs object.

SVGPathElement.createSVGPathSegLinetoRel() Deprecated

Returns a stand-alone, parentless SVGPathSegLinetoRel object.

SVGPathElement.createSVGPathSegCurvetoCubicAbs() Deprecated

Returns a stand-alone, parentless SVGPathSegCurvetoCubicAbs object.

SVGPathElement.createSVGPathSegCurvetoCubicRel() Deprecated

Returns a stand-alone, parentless SVGPathSegCurvetoCubicRel object.

SVGPathElement.createSVGPathSegCurvetoQuadraticAbs() Deprecated

Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticAbs object.

SVGPathElement.createSVGPathSegCurvetoQuadraticRel() Deprecated

Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticRel object.

SVGPathElement.createSVGPathSegArcAbs() Deprecated

Returns a stand-alone, parentless SVGPathSegArcAbs object.

SVGPathElement.createSVGPathSegArcRel() Deprecated

Returns a stand-alone, parentless SVGPathSegArcRel object.

SVGPathElement.createSVGPathSegLinetoHorizontalAbs() Deprecated

Returns a stand-alone, parentless SVGPathSegLinetoHorizontalAbs object.

SVGPathElement.createSVGPathSegLinetoHorizontalRel() Deprecated

Returns a stand-alone, parentless SVGPathSegLinetoHorizontalRel object.

SVGPathElement.createSVGPathSegLinetoVerticalAbs() Deprecated

Returns a stand-alone, parentless SVGPathSegLinetoVerticalAbs object.

SVGPathElement.createSVGPathSegLinetoVerticalRel() Deprecated

Returns a stand-alone, parentless SVGPathSegLinetoVerticalRel object.

SVGPathElement.createSVGPathSegCurvetoCubicSmoothAbs() Deprecated

Returns a stand-alone, parentless SVGPathSegCurvetoCubicSmoothAbs object.

SVGPathElement.createSVGPathSegCurvetoCubicSmoothRel() Deprecated

Returns a stand-alone, parentless SVGPathSegCurvetoCubicSmoothRel object.

SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothAbs() Deprecated

Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticSmoothAbs object.

SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothRel() Deprecated

Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticSmoothRel object.

Specifications

Specification
Scalable Vector Graphics (SVG) 2
# InterfaceSVGPathElement

Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
SVGPathElement
createSVGPathSegArcAbs
Deprecated
createSVGPathSegArcRel
Deprecated
createSVGPathSegClosePath
Deprecated
createSVGPathSegCurvetoCubicAbs
Deprecated
createSVGPathSegCurvetoCubicRel
Deprecated
createSVGPathSegCurvetoCubicSmoothAbs
Deprecated
createSVGPathSegCurvetoCubicSmoothRel
Deprecated
createSVGPathSegCurvetoQuadraticAbs
Deprecated
createSVGPathSegCurvetoQuadraticRel
Deprecated
createSVGPathSegCurvetoQuadraticSmoothAbs
Deprecated
createSVGPathSegCurvetoQuadraticSmoothRel
Deprecated
createSVGPathSegLinetoAbs
Deprecated
createSVGPathSegLinetoHorizontalAbs
Deprecated
createSVGPathSegLinetoHorizontalRel
Deprecated
createSVGPathSegLinetoRel
Deprecated
createSVGPathSegLinetoVerticalAbs
Deprecated
createSVGPathSegLinetoVerticalRel
Deprecated
createSVGPathSegMovetoAbs
Deprecated
createSVGPathSegMovetoRel
Deprecated
getPathSegAtLength
Deprecated

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Deprecated. Not for use in new websites.

See also