nl_tokens: special thanks to Chris Ferdinandi for this solution . http : // gomakethings . com / climbing - up - and - down - the - dom - tree - with - vanilla - javascript /
pl_tokens: function getParentsUntil ( elem , parent ) { for ( ; elem && elem !== document . body ; elem = elem . parentNode ) { if ( elem . hasAttribute ( parent ) ) { if ( elem . classList . contains ( 'is-active' ) ) { return elem ; } break ; } } return <mask> ; }