index.js
function findMatch(top, bottom, selector) {
  while (bottom != top && bottom) {
    if (matches(bottom, selector)) return bottom;
    bottom = bottom.parentElement;
  }
  if (bottom && matches(bottom, selector)) return bottom;
  return null;
}
function findMatch(top, bottom, selector) {
  while (bottom != top && bottom) {
    if (matches(bottom, selector)) return bottom;
    bottom = bottom.parentElement;
  }
  if (bottom && matches(bottom, selector)) return bottom;
  return null;
}
Look for an element that is a child of top
and a parent of bottom (or bottom), that matches selector.

@param {Element} top the parent node in which to search
@param {Element} bottom the starting place for the search
@param {String} selector a css query used to determine if a node matches
@return {Element|null}
@api private