-
Notifications
You must be signed in to change notification settings - Fork 5.1k
feat(chromium): add ConsoleMessage support for service workers #37368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(chromium): add ConsoleMessage support for service workers #37368
Conversation
This comment has been minimized.
This comment has been minimized.
| Console events are only supported on Chromium-based browsers and within Service Workers. | ||
| ::: | ||
|
|
||
| Emitted when JavaScript within the worker calls one of console API methods, e.g. `console.log` or `console.dir`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about browser warning/errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is copied from event: Page.console.
|
|
||
| Emitted when this dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is terminated. | ||
|
|
||
| ## event: Worker.console |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we dispatch it on the BrowserContext/Page instead and have a property indicating that it is from a service worker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets defer that to API review.
packages/playwright-core/src/server/chromium/crServiceWorker.ts
Outdated
Show resolved
Hide resolved
packages/playwright-core/src/server/chromium/crServiceWorker.ts
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
Test results for "tests 1"3 failed 1 flaky46789 passed, 821 skipped Merge workflow run. |
microsoft#37368)" This reverts commit 60bf27c.
microsoft#37368)" This reverts commit 60bf27c.
Fixes #18761