SVGNumberList: getItem() method
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.
The getItem()
method of the SVGNumberList
interface returns the specified item from the list.
The returned item is the item itself and not a copy. Any changes made to the item are immediately reflected in the list.
The first item is indexed at 0
.
Syntax
js
SVGNumberList.getItem(index)
Parameters
index
-
An integer; the index of the specified item as an unsigned long.
Return value
An SVGNumber
object; the specified item from the list.
Exceptions
NoModificationAllowedError
DOMException
-
Thrown if
SVGNumberList
corresponds to a read-only attribute or when the object itself is read-only.
Specifications
Specification |
---|
Scalable Vector Graphics (SVG) 2 # __svg__SVGNameList__getItem |
Browser compatibility
BCD tables only load in the browser