Interface TreeWalker
interface TreeWalker {
currentNode: Node;
filter: NodeFilter;
root: Node;
whatToShow: number;
firstChild(): Node;
lastChild(): Node;
nextNode(): Node;
nextSibling(): Node;
parentNode(): Node;
previousNode(): Node;
previousSibling(): Node;
}
currentNode: Node;
filter: NodeFilter;
root: Node;
whatToShow: number;
firstChild(): Node;
lastChild(): Node;
nextNode(): Node;
nextSibling(): Node;
parentNode(): Node;
previousNode(): Node;
previousSibling(): Node;
}
The nodes of a document subtree and a position within them.
MDN Reference