Skip to content

Commit 9ac6239

Browse files
committed
fix: service worker evaluation should use page-based waitForEventsAfterAction
Service worker evaluation was incorrectly skipping waitForEventsAfterAction entirely. It should use the selected page's waitForEventsAfterAction helper so that throttling settings are respected, while still being called via the page-based McpPage method rather than the removed McpContext method.
1 parent e2ebd9e commit 9ac6239

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/tools/script.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ Example with arguments: \`(el) => {
7777
}
7878

7979
const worker = await getWebWorker(context, serviceWorkerId);
80-
await performEvaluation(worker, fnString, [], response);
80+
await context.getSelectedMcpPage().waitForEventsAfterAction(async () => {
81+
await performEvaluation(worker, fnString, [], response);
82+
});
8183
return;
8284
}
8385

0 commit comments

Comments
 (0)