indexOfNodeWhere method

int indexOfNodeWhere(
  1. bool test(
    1. DOMNode node
    )
)

Implementation

int indexOfNodeWhere(bool Function(DOMNode node) test) {
  if (isEmptyContent) return -1;

  for (var i = 0; i < _content!.length; i++) {
    var child = _content![i];
    if (test(child)) return i;
  }

  return -1;
}