nl_tokens: Given a DOM node return the closest ReactDOMComponent or ReactDOMTextComponent instance ancestor .
pl_tokens: function getClosestInstanceFromNode ( node ) { if ( node [ internalInstanceKey ] ) { return node [ internalInstanceKey ] ; } while ( ! <mask> [ internalInstanceKey ] ) { if ( node . parentNode ) { node = node . parentNode ; } else { // Top of the tree. This node must not be part of a React tree (or is // unmounted, potentially). return null ; } } var inst = node [ internalInstanceKey ] ; if ( inst . tag === HostComponent || inst . tag === HostText ) { // In Fiber, this will always be the deepest root. return inst ; } return null ; }