NodeListOf
NodeList objects are collections of nodes, usually returned by properties such as Node.childNodes and methods such as document.querySelectorAll().
Extends
Extended by
Type Parameters
| Type Parameter |
|---|
TNode extends Node |
Indexable
[index: number]: TNode
Methods
[iterator]()
iterator: ArrayIterator<TNode>;
Returns
ArrayIterator<TNode>
Inherited from
entries()
entries(): ArrayIterator<[number, TNode]>;
Returns an array of key, value pairs for every entry in the list.
Returns
ArrayIterator<[number, TNode]>
Inherited from
forEach()
forEach(callbackfn, thisArg?): void;
Parameters
| Parameter | Type |
|---|---|
callbackfn | (value, key, parent) => void |
thisArg? | any |
Returns
void
Overrides
item()
item(index): TNode;
Returns a node from a NodeList by index. This method doesn't throw exceptions as long as you provide arguments. A value of null is returned if the index is out of range, and a TypeError is thrown if no argument is provided.
Parameters
| Parameter | Type |
|---|---|
index | number |
Returns
TNode
Overrides
keys()
keys(): ArrayIterator<number>;
Returns an list of keys in the list.
Returns
ArrayIterator<number>
Inherited from
values()
values(): ArrayIterator<TNode>;
Returns an list of values in the list.
Returns
ArrayIterator<TNode>
Inherited from
Properties
length
readonly length: number;
The NodeList.length property returns the number of items in a NodeList.