mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb: Implement dialog.requestClose()
This commit is contained in:
parent
b056e27afd
commit
dd37d1c536
Notes:
github-actions[bot]
2025-01-30 23:25:42 +00:00
Author: https://github.com/lukewarlow
Commit: dd37d1c536
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3280
Reviewed-by: https://github.com/ADKaster ✅
8 changed files with 67 additions and 17 deletions
|
@ -75,10 +75,11 @@ bool CloseWatcherManager::process_close_watchers()
|
|||
}
|
||||
// 2.2 For each closeWatcher of group, in reverse order:
|
||||
for (auto it = group_copy.rbegin(); it != group_copy.rend(); ++it) {
|
||||
// FIXME: 2.2.1 If the result of running closeWatcher's get enabled state is true, set processedACloseWatcher to true.
|
||||
processed_a_close_watcher = true;
|
||||
// 2.2.1 If the result of running closeWatcher's get enabled state is true, set processedACloseWatcher to true.
|
||||
if ((*it)->get_enabled_state())
|
||||
processed_a_close_watcher = true;
|
||||
// 2.2.2 Let shouldProceed be the result of requesting to close closeWatcher with true.
|
||||
bool should_proceed = (*it)->request_close();
|
||||
bool should_proceed = (*it)->request_close(true);
|
||||
// 2.2.3 If shouldProceed is false, then break;
|
||||
if (!should_proceed)
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue