matchesSelector = (element, selector) => {
  return element.matches(selector) || element.closest(selector) !== null;
}
Checks if element or one of its descendants match given selector
@param {HTMLElement} element Element to match
@param {string} selector CSS selector