SerenityOS / serenity

The Serenity Operating System 🐞
https://serenityos.org
BSD 2-Clause "Simplified" License
30.45k stars 3.18k forks source link

Cherry-pick "LibWeb: Implement CloseWatcher API" #24619

Closed nico closed 3 months ago

nico commented 3 months ago

This implements most of the CloseWatcher API from the html spec.

AbortSignal support is unimplemented.

Integration with dialogs and popovers is also unimplemented.

(cherry picked from commit b216046234560df531e1a32269e5dfa18f8f240c, manually amended to replace a single UIEvents::KeyCode::Key_Escape with KeyCode::Key_Escape in EventHandler.cpp since we don't have the second commit of https://github.com/LadybirdBrowser/ladybird/pull/86)


Cherry-picks https://github.com/LadybirdBrowser/ladybird/pull/240/