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

beforeunload dialog is not triggered #362

Closed
khongten001 opened this issue Jul 5, 2020 · 4 comments · Fixed by #504
Closed

beforeunload dialog is not triggered #362

khongten001 opened this issue Jul 5, 2020 · 4 comments · Fixed by #504

Comments

@khongten001
Copy link

As the title, would you please add a option to add {runBeforeUnload: true} when page.close? See: https://stackoverflow.com/questions/50832325/onbeforeunload-not-being-triggered-from-a-headless-browser

Thank you very much

@Ayc0
Copy link
Contributor

Ayc0 commented Nov 25, 2022

Related to this, can we make so that page.close runs with page.close({ runBeforeUnload: true })?

This could be configured via an env variable.

If this is something that you're thing could be a valuable addition to jest-puppeteer, I'd be willing to add that to jest-environment-puppeteer

@UziTech
Copy link
Contributor

UziTech commented Nov 25, 2022

@Ayc0 ya if you could make a PR with that change I could get it merges. Make sure to add tests 😁👍

@Ayc0
Copy link
Contributor

Ayc0 commented Nov 25, 2022

@UziTech, I opened #504

Does it sound good to you? (It's my first PR on this repo so I'm not sure of all the best practices)

@UziTech
Copy link
Contributor

UziTech commented Nov 26, 2022

Thanks for the PR. I will try to get a new release out in the next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants