We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f78d2f commit 23ae17fCopy full SHA for 23ae17f
apps/workers/workers/crawlerWorker.ts
@@ -544,6 +544,14 @@ async function crawlPage(
544
await globalBlocker.enableBlockingInPage(nextPage);
545
}
546
547
+ // Auto-dismiss JavaScript dialogs (alert, confirm, prompt)
548
+ // to prevent pages from hanging during crawl.
549
+ nextPage.on("dialog", (dialog) => {
550
+ dialog.dismiss().catch(() => {
551
+ // Ignore errors — the dialog may have already been closed.
552
+ });
553
554
+
555
// Block audio/video resources and disallowed sub-requests
556
await nextPage.route("**/*", async (route) => {
557
if (abortSignal.aborted) {
0 commit comments