mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 20:16:02 +00:00
LibWeb: Implement the "check if unloading is canceled" AO
This method is responsible for firing `beforeunload` events.
This commit is contained in:
parent
f807b2800e
commit
1fa948f114
Notes:
github-actions[bot]
2024-10-05 07:18:28 +00:00
Author: https://github.com/tcl3
Commit: 1fa948f114
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1614
Reviewed-by: https://github.com/awesomekling
7 changed files with 231 additions and 8 deletions
|
@ -725,6 +725,12 @@ public:
|
|||
Unicode::Segmenter& grapheme_segmenter() const;
|
||||
Unicode::Segmenter& word_segmenter() const;
|
||||
|
||||
struct StepsToFireBeforeunloadResult {
|
||||
bool unload_prompt_shown { false };
|
||||
bool unload_prompt_canceled { false };
|
||||
};
|
||||
StepsToFireBeforeunloadResult steps_to_fire_beforeunload(bool unload_prompt_shown);
|
||||
|
||||
protected:
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue