SVG number list interface
The SVGNumberList
defines a list of SVGNumber
objects.
An SVGNumberList
object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
Note: Starting in Gecko 5.0,the SVGNumberList
DOM interface is now indexable and can be accessed like arrays.
Interface overview
Also implement | None
|
Methods |
|
Properties |
|
Normative document | SVG 1.1 (2nd Edition) |
Properties
Name | Type | Description |
---|---|---|
numberOfItems
|
unsigned long | The number of items in the list. |
length '
|
unsigned long | The number of items in the list. |
Methods
Name & Arguments | Return | Description |
---|---|---|
clear()
|
void
|
Clears all existing current items from the list, with the result being an empty list. Exceptions:
|
initialize(in SVGNumber newItem )
|
SVGNumber
|
Clears all existing current items from the list and re-initializes the list to hold the single item specified by Exceptions:
|
getItem(in unsigned long index)
|
SVGNumber
|
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 number Exceptions:
|
insertItemBefore(in SVGNumber newItem , in unsigned long index )
|
SVGNumber
|
Inserts a new item into the list at the specified position. The first item is number If If the Exceptions:
|
replaceItem(in SVGNumber newItem , in unsigned long index )
|
SVGNumber
|
Replaces an existing item in the list with a new item. If Exceptions:
|
removeItem(in unsigned long index)
|
SVGNumber
|
Removes an existing item from the list. Exceptions:
|
appendItem(in SVGNumber newItem )
|
SVGNumber
|
Inserts a new item at the end of the list. If Exceptions:
|
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
SVGNumberList
|
Chrome
Full support Yes |
Edge
Full support ≤18 |
Firefox
Full support Yes |
IE
? |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support Yes |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
Legend
- Full support
- Full support
- Compatibility unknown
- Compatibility unknown
SVGNumberList by Mozilla Contributors is licensed under CC-BY-SA 2.5.