code: function hasAncestor(node, matcher) {
          while ( (node = node.parentNode) ) {
              if (matcher(node)) {
                  return true;
              }
          }
          return false;
      }
docs: /*
  function getAncestorsAndSelf(node) {
  var ancestors = getAncestors(node);
  ancestors.push(node);
  return ancestors;
  }