mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +00:00
LibWeb: Restore check to prevent closing a traversable twice
We removed this check as a workaround for a spec issue that was resolved in: https://github.com/whatwg/html/commit/3a8303ece44ed509928be626a6a65639fd
This commit is contained in:
@@ -826,9 +826,9 @@ void Window::close()
|
||||
// 1. Set thisTraversable's is closing to true.
|
||||
traversable->set_closing(true);
|
||||
|
||||
// 2. Queue a task on the DOM manipulation task source to close thisTraversable.
|
||||
// 2. Queue a task on the DOM manipulation task source to definitely close thisTraversable.
|
||||
HTML::queue_global_task(HTML::Task::Source::DOMManipulation, incumbent_global_object, JS::create_heap_function(heap(), [traversable] {
|
||||
verify_cast<TraversableNavigable>(*traversable).close_top_level_traversable();
|
||||
verify_cast<TraversableNavigable>(*traversable).definitely_close_top_level_traversable();
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user