docs: public boolean hasAncestor(ElementBase element) {
          ElementBase child = this;
          
          while (child != null) {
              if (element.hasChild(child)) {
                  return true;
              }
              child = child.getParent();
          }
          
          return false;
      }