TreeWalker
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;
}
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;
}
The nodes of a document subtree and a position within them.
MDN Reference