nl_tokens: Equivalent to nodeWalk but only returns nodes that are either ancestors or earlier cousins / siblings in the document .
pl_tokens: function nodeWalkPrior ( node , predicate ) { // Search our earlier siblings and their descendents. var parent = node . parentNode ; if ( <mask> && parent . childNodes ) { var idx = parent . childNodes . indexOf ( node ) ; var siblings = parent . childNodes . slice ( 0 , idx ) ; for ( var i = siblings . length - 1 ; i >= 0 ; i -- ) { var sibling = siblings [ i ] ; if ( predicate ( sibling ) ) { return sibling ; } var found = nodeWalk ( sibling , predicate ) ; if ( found ) { return found ; } } if ( predicate ( parent ) ) { return parent ; } return nodeWalkPrior ( parent , predicate ) ; } return undefined ; }