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