src/components/range/lib/matches-selector.js
function match (el, selector) {
  if (!el || el.nodeType !== 1) return false
  if (vendor) return vendor.call(el, selector)
  var nodes = all(selector, el.parentNode)
  for (var i = 0; i < nodes.length; ++i) {
    if (nodes[i] === el) return true
  }
  return false
}
function match (el, selector) {
  if (!el || el.nodeType !== 1) return false
  if (vendor) return vendor.call(el, selector)
  var nodes = all(selector, el.parentNode)
  for (var i = 0; i < nodes.length; ++i) {
    if (nodes[i] === el) return true
  }
  return false
}
function match ( el , selector ) { if ( ! el || el . nodeType !== 1 ) return false if ( vendor ) return vendor . call ( el , selector ) var nodes = all ( selector , el . parentNode ) for ( var i = 0 ; i < nodes . length ; ++ i ) { if ( nodes [ i ] === el ) return true } return false }
Match `el` to `selector`.

@param {Element} el
@param {String} selector
@return {Boolean}
@api public
Match el to selector .