mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 08:36:12 +00:00
LibWeb: Catch up with the spec on document destroy, abort and unload
These changes do not solve hanging `location.reload()` and `location.go()` but only align implementation with the latest edits in the specification. `WindowProxy-Get-after-detaching-from-browsing-context` test output is affected because `iframe.remove();` no longer synchronously does destruction of a document, but queues a task on event loop. Co-Authored-By: Andrew Kaster <akaster@serenityos.org>
This commit is contained in:
parent
43752a1ff8
commit
9098fa23a2
Notes:
sideshowbarker
2024-07-17 00:16:31 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: 9098fa23a2
Pull-request: https://github.com/SerenityOS/serenity/pull/23786
6 changed files with 207 additions and 81 deletions
|
@ -489,13 +489,20 @@ public:
|
|||
Vector<JS::Handle<HTML::Navigable>> inclusive_ancestor_navigables();
|
||||
Vector<JS::Handle<HTML::Navigable>> document_tree_child_navigables();
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/document-lifecycle.html#destroy-a-document
|
||||
void destroy();
|
||||
// https://html.spec.whatwg.org/multipage/document-lifecycle.html#destroy-a-document-and-its-descendants
|
||||
void destroy_a_document_and_its_descendants(JS::SafeFunction<void()> after_all_destruction = {});
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#abort-a-document
|
||||
void abort();
|
||||
// https://html.spec.whatwg.org/multipage/document-lifecycle.html#abort-a-document-and-its-descendants
|
||||
void abort_a_document_and_its_descendants();
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/document-lifecycle.html#unload-a-document
|
||||
void unload(JS::GCPtr<Document> new_document = nullptr);
|
||||
// https://html.spec.whatwg.org/multipage/document-lifecycle.html#unload-a-document-and-its-descendants
|
||||
void unload_a_document_and_its_descendants(JS::GCPtr<Document> new_document, JS::SafeFunction<void()> after_all_unloads = {});
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/dom.html#active-parser
|
||||
JS::GCPtr<HTML::HTMLParser> active_parser();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue