docs: function matchSelector(element, selector) {
          if (!element || element.nodeType !== 1) {
              return false
          }
  
          var parent,
              match,
              matchesSelector = element.webkitMatchesSelector || element.matchesSelector;
  
          if (matchesSelector) {
              match = matchesSelector.call(element, selector)
          } else {
              parent = element.parentNode;
              match = !! parent.querySelector(selector);
          }
  
          return match;
      }