should browsingContext.close resolve early when promptUnload is true #852
Description
This comes from a discussion on the following playwright issue. microsoft/playwright#34281
Playwright's page.close https://playwright.dev/docs/api/class-page#page-close will not wait for the tab to close if [runBeforeUnload](https://playwright.dev/docs/api/class-page#page-close-option-run-before-unload)
is true. Whereas on the BiDi side, browsingContext.close
will only resolve when the browsingContext is closed.
Opening this to discussion to see if that's something we would like to change on the BiDi side.
I imagine a good reason to keep the current behavior is that the command remains consistent regardless of which parameters have been set, and consumers can still decide to avoid waiting for the command if they know a beforeunloadprompt might be triggered.