w3c / webdriver-bidi

Bidirectional WebDriver protocol for browser automation
https://w3c.github.io/webdriver-bidi/
370 stars 42 forks source link

Add flag to `browsingContext.close` to skip beforeunload #462

Closed Lightning00Blade closed 1 year ago

Lightning00Blade commented 1 year ago

Original issue https://github.com/w3c/webdriver-bidi/issues/170, Original discussion comment - https://github.com/w3c/webdriver-bidi/issues/170#issuecomment-1034033101 The issue was no discussed in depth as that focused more on https://github.com/w3c/webdriver-bidi/issues/187 Currently when we close a BrowsingContext we need to run close-a-top-level-traversable in there check if unloading is canceled. From an user perspective I may want to close the BrowsingContext to free resources regardless if there is unload handlers or not.

Puppeteer CDP already supports this at Page.close, where default is to skip beforeunload.