Chartbreaker
    Preparing search index...

    Interface TreeWalker

    The TreeWalker object represents the nodes of a document subtree and a position within them.

    MDN Reference

    interface TreeWalker {
        currentNode: Node;
        filter: null | NodeFilter;
        root: Node;
        whatToShow: number;
        firstChild(): null | Node;
        lastChild(): null | Node;
        nextNode(): null | Node;
        nextSibling(): null | Node;
        parentNode(): null | Node;
        previousNode(): null | Node;
        previousSibling(): null | Node;
    }
    Index

    Properties

    currentNode: Node

    The TreeWalker.currentNode property represents the A Node.

    MDN Reference

    filter: null | NodeFilter

    The TreeWalker.filter read-only property returns the NodeFilter associated with the TreeWalker.

    MDN Reference

    root: Node

    The TreeWalker.root read-only property returns the root Node that the TreeWalker traverses.

    MDN Reference

    whatToShow: number

    The TreeWalker.whatToShow read-only property returns a bitmask that indicates the types of nodes to show.

    MDN Reference

    Methods

    • The TreeWalker.firstChild() method moves the current the found child.

      MDN Reference

      Returns null | Node

    • The TreeWalker.lastChild() method moves the current the found child.

      MDN Reference

      Returns null | Node

    • The TreeWalker.nextNode() method moves the current the found node.

      MDN Reference

      Returns null | Node

    • The TreeWalker.nextSibling() method moves the current is no such node, it returns null and the current node is not changed.

      MDN Reference

      Returns null | Node

    • The TreeWalker.parentNode() method moves the current and returns the found node.

      MDN Reference

      Returns null | Node

    • The TreeWalker.previousNode() method moves the current returns the found node.

      MDN Reference

      Returns null | Node

    • The TreeWalker.previousSibling() method moves the current there is no such node, it returns null and the current node is not changed.

      MDN Reference

      Returns null | Node