Skip to content

Implement CloseRequested for Web #3311

@daxpedda

Description

@daxpedda

This doesn't actually make sense currently, because Window on Web should be a view, see #696.
After we implement views for Web, and the Window actually represents the Web window, we could make CloseRequested a special event that if the user doesn't react to with EventLoopWindowTarget::exit(), we call Event.preventDefault().

This is useful to implement a confirmation dialog and the like, similar to what can be done on native by reacting to CloseRequested.

Firefox currently disables the B/F cache when registering the beforeunload event (Bugzilla, so until this addressed we should not implement it or disable it by default).

Metadata

Metadata

Assignees

No one assigned

    Labels

    DS - webAffects the Web backend (WebAssembly/WASM)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions