diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-08 22:29:40 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-09-06 00:27:09 +0200 |
commit | 7c3db526b0b7a9f516499b00e901ec55c695c02e (patch) | |
tree | ce8243216d2b0446c35447db92d7991a1439e626 /Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp | |
parent | a4ddb0ef8746be22b07fce3cc67b9664a4bd01ef (diff) | |
download | serenity-7c3db526b0b7a9f516499b00e901ec55c695c02e.zip |
LibWeb: Make DOM::Event and all its subclasses GC-allocated
Diffstat (limited to 'Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp b/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp index 7f594c2719..6f92886970 100644 --- a/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp +++ b/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp @@ -175,9 +175,9 @@ void XMLDocumentBuilder::document_end() // FIXME: Set the Document's load timing info's DOM content loaded event start time to the current high resolution time given the Document's relevant global object. // Fire an event named DOMContentLoaded at the Document object, with its bubbles attribute initialized to true. - auto content_loaded_event = DOM::Event::create(HTML::EventNames::DOMContentLoaded); + auto content_loaded_event = DOM::Event::create(document->preferred_window_object(), HTML::EventNames::DOMContentLoaded); content_loaded_event->set_bubbles(true); - document->dispatch_event(content_loaded_event); + document->dispatch_event(*content_loaded_event); // FIXME: Set the Document's load timing info's DOM content loaded event end time to the current high resolution time given the Document's relevant global object. @@ -213,7 +213,7 @@ void XMLDocumentBuilder::document_end() // Fire an event named load at window, with legacy target override flag set. // FIXME: The legacy target override flag is currently set by a virtual override of dispatch_event() // We should reorganize this so that the flag appears explicitly here instead. - window->dispatch_event(DOM::Event::create(HTML::EventNames::load)); + window->dispatch_event(*DOM::Event::create(document->preferred_window_object(), HTML::EventNames::load)); // FIXME: Invoke WebDriver BiDi load complete with the Document's browsing context, and a new WebDriver BiDi navigation status whose id is the Document object's navigation id, status is "complete", and url is the Document object's URL. |