@opensteer/browser-core 0.7.5 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +25 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1227,6 +1227,24 @@ var FakeBrowserCoreEngine = class {
|
|
|
1227
1227
|
data: clone(value)
|
|
1228
1228
|
});
|
|
1229
1229
|
}
|
|
1230
|
+
async evaluateFrame(input) {
|
|
1231
|
+
const frame = this.requireFrame(input.frameRef);
|
|
1232
|
+
const page = this.requirePage(frame.frameInfo.pageRef);
|
|
1233
|
+
const value = await Promise.resolve().then(() => {
|
|
1234
|
+
const evaluated = (0, eval)(input.script);
|
|
1235
|
+
if (typeof evaluated === "function") {
|
|
1236
|
+
return evaluated(...input.args ?? []);
|
|
1237
|
+
}
|
|
1238
|
+
return evaluated;
|
|
1239
|
+
});
|
|
1240
|
+
return this.createStepResult(page.sessionRef, page.pageRef, {
|
|
1241
|
+
frameRef: frame.frameInfo.frameRef,
|
|
1242
|
+
documentRef: frame.frameInfo.documentRef,
|
|
1243
|
+
documentEpoch: frame.frameInfo.documentEpoch,
|
|
1244
|
+
events: this.drainQueuedEvents(page.pageRef),
|
|
1245
|
+
data: clone(value)
|
|
1246
|
+
});
|
|
1247
|
+
}
|
|
1230
1248
|
async executeRequest(input) {
|
|
1231
1249
|
this.requireCapability("transport.sessionHttp");
|
|
1232
1250
|
input.signal?.throwIfAborted?.();
|
|
@@ -3186,6 +3204,13 @@ async function waitForActionBoundary(input) {
|
|
|
3186
3204
|
continue;
|
|
3187
3205
|
}
|
|
3188
3206
|
if (crossDocument) {
|
|
3207
|
+
if (!postLoadTrackerIsSettled(
|
|
3208
|
+
await input.readTrackerState(),
|
|
3209
|
+
DEFAULT_POST_LOAD_TRACKER_QUIET_WINDOW_MS
|
|
3210
|
+
)) {
|
|
3211
|
+
await delay(Math.min(pollIntervalMs, Math.max(0, deadline - Date.now())));
|
|
3212
|
+
continue;
|
|
3213
|
+
}
|
|
3189
3214
|
return {
|
|
3190
3215
|
trigger,
|
|
3191
3216
|
crossDocument,
|