Interface NodeList
interface NodeList {
length: number;
[iterator](): ArrayIterator<Node>;
entries(): ArrayIterator<[number, Node]>;
forEach(callbackfn: ((value: Node, key: number, parent: NodeList) => void), thisArg?: any): void;
item(index: number): Node;
keys(): ArrayIterator<number>;
values(): ArrayIterator<Node>;
[index: number]: Node;
}
length: number;
[iterator](): ArrayIterator<Node>;
entries(): ArrayIterator<[number, Node]>;
forEach(callbackfn: ((value: Node, key: number, parent: NodeList) => void), thisArg?: any): void;
item(index: number): Node;
keys(): ArrayIterator<number>;
values(): ArrayIterator<Node>;
[index: number]: Node;
}
Hierarchy
- NodeList (view full)
Indexable
Methods
[iterator]
- [iterator](): ArrayIterator<Node>
Returns ArrayIterator<Node>
entries
- entries(): ArrayIterator<[number, Node]>
Returns an array of key, value pairs for every entry in the list.
Returns ArrayIterator<[number, Node]>
forEach
- for
Each (callbackfn, thisArg?): void Performs the specified action for each node in an list.
Parameters
- callbackfn: ((value: Node, key: number, parent: NodeList) => void)
A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the list.
- (value, key, parent): void
Returns void
Optional
thisArg: anyAn object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
Returns void
- callbackfn: ((value: Node, key: number, parent: NodeList) => void)
item
keys
- keys(): ArrayIterator<number>
Returns an list of keys in the list.
Returns ArrayIterator<number>
values
- values(): ArrayIterator<Node>
Returns an list of values in the list.
Returns ArrayIterator<Node>
Returns the number of nodes in the collection.
MDN Reference