SVGGeometryElement

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 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.

EventTarget Node Element SVGElement SVGGraphicsElement SVGGeometryElement

Instance properties

This interface also inherits properties from its parent, SVGGraphicsElement.

SVGGeometryElement.pathLength Read only

This property reflects the pathLength attribute.

Instance methods

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.

Specifications

Specification
Scalable Vector Graphics (SVG) 2
# InterfaceSVGGeometryElement

Browser compatibility

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
Chrome – Partial support
Chrome 1 – 55 (Release date: 2008-12-11)
footnote Partial support
footnote The SVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface.
Chrome – Full support
Chrome 56 (Release date: 2017-01-25)
footnote Full support
Edge – Partial support
Edge 12 – 18 (Release date: 2015-07-29)
footnote Partial support
footnote The SVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface.
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Partial support
Firefox 1.5 – 52 (Release date: 2005-11-29)
footnote Partial support
footnote The SVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface.
Firefox – Full support
Firefox 53 (Release date: 2017-04-19)
footnote Full support
Opera – Partial support
Opera 12.1 – 42 (Release date: 2012-11-20)
footnote Partial support
footnote The SVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface.
Opera – Full support
Opera 43 (Release date: 2017-02-07)
footnote Full support
Safari – Partial support
Safari 3 – 11.1 (Release date: 2007-10-26)
footnote Partial support
footnote The SVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface.
Safari – Full support
Safari 12 (Release date: 2018-09-17)
footnote Full support
Chrome Android – Partial support
Chrome Android 18 – 55 (Release date: 2012-06-27)
footnote Partial support
footnote The SVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface.
Chrome Android – Full support
Chrome Android 56 (Release date: 2017-02-01)
footnote Full support
Firefox for Android – Partial support
Firefox for Android 4 – 52 (Release date: 2011-03-29)
footnote Partial support
footnote The SVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface.
Firefox for Android – Full support
Firefox for Android 53 (Release date: 2017-04-19)
footnote Full support
Opera Android – Partial support
Opera Android 12.1 – 42 (Release date: 2012-10-09)
footnote Partial support
footnote The SVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface.
Opera Android – Full support
Opera Android 43 (Release date: 2017-09-27)
footnote Full support
Safari on iOS – Partial support
Safari on iOS 1 – 11.3 (Release date: 2007-06-29)
footnote Partial support
footnote The SVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface.
Safari on iOS – Full support
Safari on iOS 12 (Release date: 2018-09-17)
footnote Full support
Samsung Internet – Partial support
Samsung Internet 1 – 5.4 (Release date: 2013-04-27)
footnote Partial support
footnote The SVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface.
Samsung Internet – Full support
Samsung Internet 6 (Release date: 2017-08-23)
footnote Full support
WebView Android – Partial support
WebView Android 4.4 – 55 (Release date: 2013-12-09)
footnote Partial support
footnote The SVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface.
WebView Android – Full support
WebView Android 56 (Release date: 2017-02-01)
footnote Full support
WebView on iOS – Partial support
WebView on iOS 1 – 11.3 (Release date: 2007-06-29)
footnote Partial support
footnote The SVGGeometryElement interface itself is not present, but some of its members are available on the SVGPathElement interface.
WebView on iOS – Full support
WebView on iOS 12 (Release date: 2018-09-17)
footnote Full support
getPointAtLength
Chrome – Partial support
Chrome 1 – 55 (Release date: 2008-12-11)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Chrome – Full support
Chrome 56 (Release date: 2017-01-25)
footnote Full support
Edge – Partial support
Edge 12 – 18 (Release date: 2015-07-29)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Partial support
Firefox 1.5 – 60 (Release date: 2005-11-29)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Firefox – Full support
Firefox 61 (Release date: 2018-06-26)
footnote Full support
Opera – Partial support
Opera 12.1 – 42 (Release date: 2012-11-20)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Opera – Full support
Opera 43 (Release date: 2017-02-07)
footnote Full support
Safari – Partial support
Safari 3 – 11.1 (Release date: 2007-10-26)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Safari – Full support
Safari 12 (Release date: 2018-09-17)
footnote Full support
Chrome Android – Partial support
Chrome Android 18 – 55 (Release date: 2012-06-27)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Chrome Android – Full support
Chrome Android 56 (Release date: 2017-02-01)
footnote Full support
Firefox for Android – Partial support
Firefox for Android 4 – 60 (Release date: 2011-03-29)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Firefox for Android – Full support
Firefox for Android 61 (Release date: 2018-06-26)
footnote Full support
Opera Android – Partial support
Opera Android 12.1 – 42 (Release date: 2012-10-09)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Opera Android – Full support
Opera Android 43 (Release date: 2017-09-27)
footnote Full support
Safari on iOS – Partial support
Safari on iOS 1 – 11.3 (Release date: 2007-06-29)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Safari on iOS – Full support
Safari on iOS 12 (Release date: 2018-09-17)
footnote Full support
Samsung Internet – Partial support
Samsung Internet 1 – 5.4 (Release date: 2013-04-27)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Samsung Internet – Full support
Samsung Internet 6 (Release date: 2017-08-23)
footnote Full support
WebView Android – Partial support
WebView Android 4.4 – 55 (Release date: 2013-12-09)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
WebView Android – Full support
WebView Android 56 (Release date: 2017-02-01)
footnote Full support
WebView on iOS – Partial support
WebView on iOS 1 – 11.3 (Release date: 2007-06-29)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
WebView on iOS – Full support
WebView on iOS 12 (Release date: 2018-09-17)
footnote Full support
getTotalLength
Chrome – Partial support
Chrome 1 – 55 (Release date: 2008-12-11)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Chrome – Full support
Chrome 56 (Release date: 2017-01-25)
footnote Full support
Edge – Partial support
Edge 12 – 18 (Release date: 2015-07-29)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Partial support
Firefox 1.5 – 60 (Release date: 2005-11-29)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Firefox – Full support
Firefox 61 (Release date: 2018-06-26)
footnote Full support
Opera – Partial support
Opera 12.1 – 42 (Release date: 2012-11-20)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Opera – Full support
Opera 43 (Release date: 2017-02-07)
footnote Full support
Safari – Partial support
Safari 3 – 11.1 (Release date: 2007-10-26)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Safari – Full support
Safari 12 (Release date: 2018-09-17)
footnote Full support
Chrome Android – Partial support
Chrome Android 18 – 55 (Release date: 2012-06-27)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Chrome Android – Full support
Chrome Android 56 (Release date: 2017-02-01)
footnote Full support
Firefox for Android – Partial support
Firefox for Android 4 – 60 (Release date: 2011-03-29)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Firefox for Android – Full support
Firefox for Android 61 (Release date: 2018-06-26)
footnote Full support
Opera Android – Partial support
Opera Android 12.1 – 42 (Release date: 2012-10-09)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Opera Android – Full support
Opera Android 43 (Release date: 2017-09-27)
footnote Full support
Safari on iOS – Partial support
Safari on iOS 1 – 11.3 (Release date: 2007-06-29)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Safari on iOS – Full support
Safari on iOS 12 (Release date: 2018-09-17)
footnote Full support
Samsung Internet – Partial support
Samsung Internet 1 – 5.4 (Release date: 2013-04-27)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Samsung Internet – Full support
Samsung Internet 6 (Release date: 2017-08-23)
footnote Full support
WebView Android – Partial support
WebView Android 4.4 – 55 (Release date: 2013-12-09)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
WebView Android – Full support
WebView Android 56 (Release date: 2017-02-01)
footnote Full support
WebView on iOS – Partial support
WebView on iOS 1 – 11.3 (Release date: 2007-06-29)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
WebView on iOS – Full support
WebView on iOS 12 (Release date: 2018-09-17)
footnote Full support
isPointInFill
Chrome – Full support
Chrome 33 (Release date: 2014-02-20)
footnote
footnote The element this method is called for must be in the DOM; otherwise, this method will always return false.
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote
footnote The element this method is called for must be in the DOM; otherwise, this method will always return false.
Firefox – Full support
Firefox 69 (Release date: 2019-09-03)
footnote Full support
Opera – Full support
Opera 20 (Release date: 2014-03-04)
footnote
footnote The element this method is called for must be in the DOM; otherwise, this method will always return false.
Safari – Full support
Safari 12 (Release date: 2018-09-17)
footnote Full support
Chrome Android – Full support
Chrome Android 33 (Release date: 2014-02-26)
footnote
footnote The element this method is called for must be in the DOM; otherwise, this method will always return false.
Firefox for Android – Full support
Firefox for Android 79 (Release date: 2020-07-28)
footnote Full support
Opera Android – Full support
Opera Android 20 (Release date: 2014-03-06)
footnote
footnote The element this method is called for must be in the DOM; otherwise, this method will always return false.
Safari on iOS – Full support
Safari on iOS 12 (Release date: 2018-09-17)
footnote Full support
Samsung Internet – Full support
Samsung Internet 3 (Release date: 2015-04-10)
footnote Full support
WebView Android – Full support
WebView Android 4.4.3 (Release date: 2014-06-02)
footnote
footnote The element this method is called for must be in the DOM; otherwise, this method will always return false.
WebView on iOS – Full support
WebView on iOS 12 (Release date: 2018-09-17)
footnote Full support
Accepts a DOMPoint as point parameter
Chrome – Full support
Chrome 136 (Release date: 2025-04-29)
footnote Full support
Edge – Full support
Edge 136 (Release date: 2025-05-01)
footnote Full support
Firefox – Full support
Firefox 69 (Release date: 2019-09-03)
footnote Full support
Opera – Full support
Opera 121 (Release date: 2025-08-27)
footnote Full support
Safari – Full support
Safari 12 (Release date: 2018-09-17)
footnote Full support
Chrome Android – Full support
Chrome Android 136 (Release date: 2025-04-29)
footnote Full support
Firefox for Android – Full support
Firefox for Android 79 (Release date: 2020-07-28)
footnote Full support
Opera Android – Full support
Opera Android 90 (Release date: 2025-06-18)
footnote Full support
Safari on iOS – Full support
Safari on iOS 12 (Release date: 2018-09-17)
footnote Full support
Samsung Internet – Full support
Samsung Internet 29 (Release date: 2025-10-25)
footnote Full support
WebView Android – Full support
WebView Android 136 (Release date: 2025-04-29)
footnote Full support
WebView on iOS – Full support
WebView on iOS 12 (Release date: 2018-09-17)
footnote Full support
isPointInStroke
Chrome – Full support
Chrome 33 (Release date: 2014-02-20)
footnote
footnote The element this method is called for must be in the DOM; otherwise, this method will always return false.
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote
footnote The element this method is called for must be in the DOM; otherwise, this method will always return false.
Firefox – Full support
Firefox 69 (Release date: 2019-09-03)
footnote Full support
Opera – Full support
Opera 20 (Release date: 2014-03-04)
footnote
footnote The element this method is called for must be in the DOM; otherwise, this method will always return false.
Safari – Full support
Safari 12 (Release date: 2018-09-17)
footnote Full support
Chrome Android – Full support
Chrome Android 33 (Release date: 2014-02-26)
footnote
footnote The element this method is called for must be in the DOM; otherwise, this method will always return false.
Firefox for Android – Full support
Firefox for Android 79 (Release date: 2020-07-28)
footnote Full support
Opera Android – Full support
Opera Android 20 (Release date: 2014-03-06)
footnote
footnote The element this method is called for must be in the DOM; otherwise, this method will always return false.
Safari on iOS – Full support
Safari on iOS 12 (Release date: 2018-09-17)
footnote Full support
Samsung Internet – Full support
Samsung Internet 3 (Release date: 2015-04-10)
footnote Full support
WebView Android – Full support
WebView Android 4.4.3 (Release date: 2014-06-02)
footnote
footnote The element this method is called for must be in the DOM; otherwise, this method will always return false.
WebView on iOS – Full support
WebView on iOS 12 (Release date: 2018-09-17)
footnote Full support
Accepts a DOMPoint as point parameter
Chrome – Full support
Chrome 136 (Release date: 2025-04-29)
footnote Full support
Edge – Full support
Edge 136 (Release date: 2025-05-01)
footnote Full support
Firefox – Full support
Firefox 69 (Release date: 2019-09-03)
footnote Full support
Opera – Full support
Opera 121 (Release date: 2025-08-27)
footnote Full support
Safari – Full support
Safari 12 (Release date: 2018-09-17)
footnote Full support
Chrome Android – Full support
Chrome Android 136 (Release date: 2025-04-29)
footnote Full support
Firefox for Android – Full support
Firefox for Android 79 (Release date: 2020-07-28)
footnote Full support
Opera Android – Full support
Opera Android 90 (Release date: 2025-06-18)
footnote Full support
Safari on iOS – Full support
Safari on iOS 12 (Release date: 2018-09-17)
footnote Full support
Samsung Internet – Full support
Samsung Internet 29 (Release date: 2025-10-25)
footnote Full support
WebView Android – Full support
WebView Android 136 (Release date: 2025-04-29)
footnote Full support
WebView on iOS – Full support
WebView on iOS 12 (Release date: 2018-09-17)
footnote Full support
pathLength
Chrome – Partial support
Chrome 1 – 56 (Release date: 2008-12-11)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Chrome – Full support
Chrome 57 (Release date: 2017-03-09)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Partial support
Firefox 1.5 – 60 (Release date: 2005-11-29)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Firefox – Full support
Firefox 61 (Release date: 2018-06-26)
footnote Full support
Opera – Partial support
Opera 12.1 – 43 (Release date: 2012-11-20)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Opera – Full support
Opera 44 (Release date: 2017-03-21)
footnote Full support
Safari – Partial support
Safari 3 – 11.1 (Release date: 2007-10-26)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Safari – Full support
Safari 12 (Release date: 2018-09-17)
footnote Full support
Chrome Android – Partial support
Chrome Android 18 – 56 (Release date: 2012-06-27)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Chrome Android – Full support
Chrome Android 57 (Release date: 2017-03-16)
footnote Full support
Firefox for Android – Partial support
Firefox for Android 4 – 60 (Release date: 2011-03-29)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Firefox for Android – Full support
Firefox for Android 61 (Release date: 2018-06-26)
footnote Full support
Opera Android – Partial support
Opera Android 12.1 – 42 (Release date: 2012-10-09)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Opera Android – Full support
Opera Android 43 (Release date: 2017-09-27)
footnote Full support
Safari on iOS – Partial support
Safari on iOS 1 – 11.3 (Release date: 2007-06-29)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Safari on iOS – Full support
Safari on iOS 12 (Release date: 2018-09-17)
footnote Full support
Samsung Internet – Partial support
Samsung Internet 1 – 6.4 (Release date: 2013-04-27)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Samsung Internet – Full support
Samsung Internet 7 (Release date: 2018-03-16)
footnote Full support
WebView Android – Partial support
WebView Android 4.4 – 56 (Release date: 2013-12-09)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
WebView Android – Full support
WebView Android 57 (Release date: 2017-03-16)
footnote Full support
WebView on iOS – Partial support
WebView on iOS 1 – 11.3 (Release date: 2007-06-29)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
WebView on iOS – Full support
WebView on iOS 12 (Release date: 2018-09-17)
footnote Full support

Legend

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

Full support
Full support
Partial support
Partial support
See implementation notes.
Has more compatibility info.