This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2020.
The length property of the SVGStringList interface returns the number of items in the list. It is an alias of numberOfItems to make SVG lists more array-like.
A non-negative integer that represents the number of items in the list.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
length |
35 | 79 | 12 | ≤12.1 | 13.1 | 35 | 14 | ≤12.1 | 13.4 | 3.0 | 37 | 13.4 |
© 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/SVGStringList/length