Skip to content

should browsingContext.close resolve early when promptUnload is true  #852

Open
@juliandescottes

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.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions