For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages
are available by appending .md to any URL.
Interface NodeListOf<TNode>
interface NodeListOf<TNode extends Node> {
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
Hierarchy (View Summary)
- NodeList
- NodeListOf
Indexable
Properties
Readonlylength
length: number
The NodeList.length property returns the number of items in a NodeList.
Methods
[iterator]
-
Returns ArrayIterator<TNode>
entries
-
Returns an array of key, value pairs for every entry in the list.
Returns ArrayIterator<[number, TNode]>
forEach
-
forEach(
callbackfn: (
value: TNode,
key: number,
parent: NodeListOf<TNode>,
) => void,
thisArg?: any,
): voidParameters
- callbackfn: (value: TNode, key: number, parent: NodeListOf<TNode>) => void
OptionalthisArg: any
Returns void
item
-
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
- index: number
Returns TNode
keys
-
Returns an list of keys in the list.
Returns ArrayIterator<number>
values
-
Returns an list of values in the list.
Returns ArrayIterator<TNode>
NodeListobjects are collections of nodes, usually returned by properties such as Node.childNodes and methods such as document.querySelectorAll().MDN Reference