The TreeWalker.
The TreeWalker.currentNode property represents the Node on which the TreeWalker is currently pointing at.
MDN
The TreeWalker.
The TreeWalker.root read-only property returns the node that is the root of what the TreeWalker traverses.
MDN
Returns an unsigned long being a bitmask made of constants describing the types of Node that must to be presented.
Returns an unsigned long being a bitmask made of constants describing the types of Node that must to be presented. Non-matching nodes are skipped, but their children may be included, if relevant.
MDN
The TreeWalker object represents the nodes of a document subtree and a position within them.
A TreeWalker can be created using the Document.createTreeWalker() method.
MDN