diff options
author | Kenneth Myhra <kennethmyhra@gmail.com> | 2023-02-14 22:43:17 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-18 00:52:47 +0100 |
commit | c120c46acc4bc12fa8f3f9ed5f9f953626d3cf9e (patch) | |
tree | 2580e04e199646f6885bd276954811bf25061302 /Userland/Libraries/LibWeb/HTML/Parser | |
parent | 0d9076c9f57bb5eba064a803241e9d25843b58f1 (diff) | |
download | serenity-c120c46acc4bc12fa8f3f9ed5f9f953626d3cf9e.zip |
LibWeb: Make factory methods of DOM::Event fallible
Because of interdependencies between DOM::Event and UIEvents::MouseEvent
to template function fire_an_event() in WebDriverConnection.cpp, the
commit: 'LibWeb: Make factory methods of UIEvents::MouseEvent fallible'
have been squashed into this commit.
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/Parser')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp index 9e1c172513..b8148c3fee 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp @@ -253,9 +253,9 @@ void HTMLParser::the_end() document->load_timing_info().dom_content_loaded_event_start_time = HighResolutionTime::unsafe_shared_current_time(); // 2. Fire an event named DOMContentLoaded at the Document object, with its bubbles attribute initialized to true. - auto content_loaded_event = DOM::Event::create(document->realm(), HTML::EventNames::DOMContentLoaded); + auto content_loaded_event = DOM::Event::create(document->realm(), HTML::EventNames::DOMContentLoaded).release_value_but_fixme_should_propagate_errors(); content_loaded_event->set_bubbles(true); - document->dispatch_event(*content_loaded_event); + document->dispatch_event(content_loaded_event); // 3. 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. document->load_timing_info().dom_content_loaded_event_end_time = HighResolutionTime::unsafe_shared_current_time(); @@ -294,7 +294,7 @@ void HTMLParser::the_end() // 5. 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(document->realm(), HTML::EventNames::load)); + window->dispatch_event(DOM::Event::create(document->realm(), HTML::EventNames::load).release_value_but_fixme_should_propagate_errors()); // FIXME: 6. 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. |