Walk each node in the tree with a depth-first traversal. Walking stops if the callback returns true.
The tree to walk.
The callback to call on each node. If this returns true, the walking stops.
true
The nav tree node that the callback returned true on, if any. Otherwise, undefined.
undefined
Walk each node in the tree with a depth-first traversal. Walking stops if the callback returns true.