JsHandle.fromRemoteObject constructor

JsHandle.fromRemoteObject(
  1. ExecutionContext context,
  2. RemoteObject remoteObject
)

Implementation

factory JsHandle.fromRemoteObject(
    ExecutionContext context, RemoteObject remoteObject) {
  var frame = context.frame;
  if (remoteObject.subtype == RemoteObjectSubtype.node && frame != null) {
    var frameManager = context.world!.frameManager;
    return ElementHandle(context, remoteObject, context.frame, frameManager);
  }
  return JsHandle(context, remoteObject);
}