Skip to content
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: introduce page.on('crash') event #1782

Merged
merged 2 commits into from Apr 15, 2020

Conversation

aslushnikov
Copy link
Collaborator

Currently, whenever the page crashes, it emits an 'error' event.
Error event is a special type of event in node.js; if unhandled,
it crashes the process.

Instead of emitting 'error' event, this patch switches to emitting
'crash' event. Playwright users are free to handle the event
however they like, or just to ignore it.

@@ -104,19 +104,16 @@ describe('Async stacks', () => {
});
});

describe('Page.Events.error', function() {
describe('Page.Events.Crash', function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a test that you cannot do anything with the page after crash, and ensure that.

Currently, whenever the page crashes, it emits an `'error'` event.
Error event is a special type of event in node.js; if unhandled,
it crashes the process.

Instead of emitting `'error'` event, this patch switches to emitting
`'crash'` event. Playwright users are free to handle the event
however they like, or just to ignore it.
@aslushnikov aslushnikov merged commit 0ba823d into microsoft:master Apr 15, 2020
@aslushnikov aslushnikov deleted the support-page-crash branch April 15, 2020 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants