diff options
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. |