ent.parentNode;
            }
            element = element.parentNode;
          }
          return null;
        }

        findAllAncestors(element, selector) {
          const ancestors = [];
          while (element.parentNode && element.parentNode.nodeType === 1) {
            if (element.parentNode.matches(selector)) {
              ancestors.unshift(element.parentNode);
            }
            element = element.parentNode;
          }
          return ancestors;
        }

        // The addition 