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>

NodeList objects are collections of nodes, usually returned by properties such as Node.childNodes and methods such as document.querySelectorAll().

MDN Reference

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;
}

Type Parameters

Hierarchy (View Summary)

Indexable

Index
length: number

The NodeList.length property returns the number of items in a NodeList.

MDN Reference

  • Parameters

    Returns void

  • 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.

    MDN Reference

    Parameters

    • index: number

    Returns TNode

Was this helpful?