Interface NodeListOf<TNode>
interface NodeListOf<TNode> {
length: number;
[iterator](): ArrayIterator<TNode>;
entries(): ArrayIterator<[number, TNode]>;
forEach(callbackfn: ((value: TNode, key: number, parent: NodeListOf<TNode>) => void), thisArg?: any): void;
item(index: number): TNode;
keys(): ArrayIterator<number>;
values(): ArrayIterator<TNode>;
[index: number]: TNode;
}
length: number;
[iterator](): ArrayIterator<TNode>;
entries(): ArrayIterator<[number, TNode]>;
forEach(callbackfn: ((value: TNode, key: number, parent: NodeListOf<TNode>) => void), thisArg?: any): void;
item(index: number): TNode;
keys(): ArrayIterator<number>;
values(): ArrayIterator<TNode>;
[index: number]: TNode;
}
Type Parameters
- TNode extends Node
Indexable
Methods
[iterator]
- [iterator](): ArrayIterator<TNode>
Returns ArrayIterator<TNode>
entries
- entries(): ArrayIterator<[number, TNode]>
Returns an array of key, value pairs for every entry in the list.
Returns ArrayIterator<[number, TNode]>
forEach
- for
Each (callbackfn, thisArg?): void Performs the specified action for each node in an list.
Parameters
- callbackfn: ((value: TNode, key: number, parent: NodeListOf<TNode>) => 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
Parameters
- value: TNode
- key: number
- parent: NodeListOf<TNode>
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: TNode, key: number, parent: NodeListOf<TNode>) => void)
item
keys
- keys(): ArrayIterator<number>
Returns an list of keys in the list.
Returns ArrayIterator<number>
values
- values(): ArrayIterator<TNode>
Returns an list of values in the list.
Returns ArrayIterator<TNode>
Returns the number of nodes in the collection.
MDN Reference