Skip to content

Commit a8728d9

Browse files
authored
chore: introduce env.PLAYWRIGHT_DISABLE_SERVICE_WORKER_CONSOLE to opt out (#38261)
1 parent f98bcc5 commit a8728d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/playwright-core/src/server/chromium/crServiceWorker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class CRServiceWorker extends Worker {
5252
}
5353

5454
session.on('Runtime.consoleAPICalled', event => {
55-
if (!this.existingExecutionContext)
55+
if (!this.existingExecutionContext || process.env.PLAYWRIGHT_DISABLE_SERVICE_WORKER_CONSOLE)
5656
return;
5757
const args = event.args.map(o => createHandle(this.existingExecutionContext!, o));
5858
const message = new ConsoleMessage(null, this, event.type, undefined, args, toConsoleMessageLocation(event.stackTrace));

0 commit comments

Comments
 (0)