matchesWithAncestors method
Implementation
bool matchesWithAncestors(String selectors) {
Element? element = this;
while (element != null) {
if (_matches(element, selectors, null)) {
return true;
}
element = element.parent;
}
return false;
}