queryObjects method
The method iterates the JavaScript heap and finds all the objects with the given prototype.
Implementation
Future<JsHandle> queryObjects(JsHandle prototypeHandle) async {
if (prototypeHandle.isDisposed) {
throw Exception('Prototype JSHandle is disposed!');
}
if (prototypeHandle.remoteObject.objectId == null) {
throw Exception(
'Prototype JSHandle must not be referencing primitive value');
}
var response =
await runtimeApi.queryObjects(prototypeHandle.remoteObject.objectId!);
return _createHandle(response);
}