code: function isVisible(node) {
          if (!node) {
              return false;
          }
  
          if (isOrHasAncestor(node, function(node) {
              return node.nodeType == 1 && getComputedStyleProperty(node, "display") == "none";
          })) {
              return false;
          }
  
          if (isBlockNode(node)
          || (node.nodeType == 3 && !isCollapsedWhitespaceNode(node))
          || isHtmlElement(node, "img")
          || (isHtmlElement(node, "br") && !isExtraneousLineBreak(node))) {
              return true;
          }
  
          for (var i = 0, childNodes = node.childNodes, len = childNodes.length; i < len; ++i) {
              if (isVisible(childNodes[i])) {
                  return true;
              }
          }
  
          return false;
      }
docs: "Something is visible if it is a node that either is a block node, or a Text node that is not a collapsed whitespace node, or an img, or a br that is not an extraneous line break, or any node with a visible descendant; excluding any node with an ancestor container Element whose "display" property has resolved value "none"."