thisOrAncestorMatching<E extends Element> method

E thisOrAncestorMatching <E extends Element>(
  1. Predicate<Element> predicate
)

Return either this element or the most immediate ancestor of this element for which the predicate returns true, or null if there is no such element.

Implementation

E thisOrAncestorMatching<E extends Element>(Predicate<Element> predicate);