mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 22:30:31 +00:00
LibWeb: Implement window.close and window.closed
This commit is contained in:
parent
ae130822a0
commit
aa1df95b31
Notes:
github-actions[bot]
2024-10-06 00:43:21 +00:00
Author: https://github.com/trflynn89
Commit: aa1df95b31
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1644
Reviewed-by: https://github.com/shannonbooth ✅
7 changed files with 86 additions and 6 deletions
|
@ -1178,8 +1178,9 @@ void TraversableNavigable::close_top_level_traversable()
|
|||
VERIFY(is_top_level_traversable());
|
||||
|
||||
// 1. If traversable's is closing is true, then return.
|
||||
if (is_closing())
|
||||
return;
|
||||
// FIXME: Spec-issue: The only place in the spec that sets the `is closing` flag to true is `window.close`, and it
|
||||
// does so immediately before invoking this method. So it does not make sense to return early here.
|
||||
// https://github.com/whatwg/html/issues/10678
|
||||
|
||||
// 2. Let toUnload be traversable's active document's inclusive descendant navigables.
|
||||
auto to_unload = active_document()->inclusive_descendant_navigables();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue