Interface SVGLengthList
length: number;
numberOfItems: number;
"[iterator]"(): ArrayIterator<SVGLength>;
appendItem(newItem: SVGLength): SVGLength;
clear(): void;
getItem(index: number): SVGLength;
initialize(newItem: SVGLength): SVGLength;
insertItemBefore(newItem: SVGLength, index: number): SVGLength;
removeItem(index: number): SVGLength;
replaceItem(newItem: SVGLength, index: number): SVGLength;
[index: number]: SVGLength;
}
Indexable
Properties
Readonlylength
The length property of the SVGLengthList interface returns the number of items in the list. It is an alias of numberOfItems to make SVG lists more array-like.
ReadonlynumberOfItems
The numberOfItems property of the SVGLengthList interface returns the number of items in the list. length is an alias of it.
Methods
[iterator]
-
Returns ArrayIterator<SVGLength>
appendItem
-
The
appendItem()method of the SVGLengthList interface inserts a new item at the end of the list. If the given item is already in a list, it is removed from its previous list before it is inserted into this list. The inserted item is the item itself and not a copy.Parameters
- newItem: SVGLength
Returns SVGLength
clear
-
The
clear()method of the SVGLengthList interface clears all existing items from the list, with the result being an empty list.Returns void
getItem
-
The
getItem()method of the SVGLengthList 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 0.Parameters
- index: number
Returns SVGLength
initialize
-
The
initialize()method of the SVGLengthList interface clears all existing items from the list and re-initializes the list to hold the single item specified by the parameter. If the inserted item is already in a list, it is removed from its previous list before it is inserted into this list. The inserted item is the item itself and not a copy. The return value is the item inserted into the list.Parameters
- newItem: SVGLength
Returns SVGLength
insertItemBefore
removeItem
-
The
removeItem()method of the SVGLengthList interface removes an existing item at the given index from the list.Parameters
- index: number
Returns SVGLength
replaceItem
-
The
replaceItem()method of the SVGLengthList interface replaces an existing item in the list with a new item. If the new item is already in a list, it is removed from its previous list before it is inserted into this list. The inserted item is the item itself and not a copy. If the item is already in this list, note that the index of the item to replace is before the removal of the item.Parameters
- newItem: SVGLength
- index: number
Returns SVGLength
The
SVGLengthListinterface defines a list of SVGLength objects. It is used for the baseVal and animVal properties of SVGAnimatedLengthList.MDN Reference