waitForFrame method

Future<Frame> waitForFrame(
  1. bool predicate(
    1. Frame
    )
)

Implementation

Future<Frame> waitForFrame(bool Function(Frame) predicate) async {
  return StreamGroup.merge([
    onFrameAttached,
    onFrameNavigated,
    for (var frame in frames) Stream.value(frame),
  ]).takeUntil(onClose).firstWhere(predicate);
}