demo/bundle.js
// "off" state, so we need to recursively check parents.
"off" state, so we need to recursively check parents.
" off " state so we need to recursively check parents .
function isOff(node, nodeComputedStyle) {
                if (node === elementDocument.documentElement) return false;
                for (var i = 0, length = isOffCache.length; i < length; i++) {
                  if (isOffCache[i][0] === node) return isOffCache[i][1];
                }
                nodeComputedStyle = nodeComputedStyle || elementDocument.defaultView.getComputedStyle(node);
                var result = false;
                if (nodeComputedStyle.display === 'none') {
                  result = true;
                } else if (node.parentNode) {
                  result = isOff(node.parentNode);
                }
                isOffCache.push([node, result]);
                return result;
              }
function isOff ( node , nodeComputedStyle ) { if ( node === elementDocument . documentElement ) return false ; for ( var i = 0 , length = isOffCache . length ; i < length ; i ++ ) { if ( isOffCache [ i ] [ 0 ] === node ) return isOffCache [ i ] [ 1 ] ; } nodeComputedStyle = nodeComputedStyle || elementDocument . defaultView . getComputedStyle ( node ) ; var result = false ; if ( nodeComputedStyle . display === 'none' ) { result = true ; } else if ( node . parentNode ) { result = isOff ( node . parentNode ) ; } isOffCache . push ( [ node , result ] ) ; return result ; }
"off" state, so we need to recursively check parents.
" off " state so we need to recursively check parents .
// Find the cached node (Array.prototype.find not available in IE9)