thisOrAncestorMatching2<E extends Element2> abstract method

E? thisOrAncestorMatching2<E extends Element2>(
  1. bool predicate(
    1. Element2
    )
)

Returns either this element or the most immediate ancestor of this element for which the predicate returns true.

Returns null if there is no such element.

Implementation

E? thisOrAncestorMatching2<E extends Element2>(
  bool Function(Element2) predicate,
);