previousNode

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

MDN Reference