code: function checkDelegate(event, node, selector) {
      if (!selector) {
          return node;
      }
      let target = event.target;
      while (target && target !== node) {
          if (MATCHES_SELECTOR.call(target, selector)) {
              return target;
          }
          target = target.parentNode;
      }
      return null;
  }
docs: Check if an event has a selector in mathc in target list.
  @private
  
  @param {Event} event The event to check.
  @param {HTMLElement} node The root node.
  @param {String} selector The CSS selector to match.
  @return {HTMLElement} The element in target list which matches the selector.