nextNode

The TreeWalker.nextNode() method moves the current Node to the next visible node in the document order, and returns the found node.

MDN Reference