nl_tokens: Walk the tree up from the parent of node to its grandparent and so on to the root of the tree . Return the first ancestor that matches the given predicate .
pl_tokens: function nodeWalkAncestors ( node , predicate ) { var parent = <mask> . parentNode ; if ( ! parent ) { return undefined ; } if ( predicate ( parent ) ) { return parent ; } return nodeWalkAncestors ( parent , predicate ) ; }