1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 00:55:08 +00:00

LibWeb: Port {HTML,UIEvents,XHR}::EventNames to new String

This commit is contained in:
Kenneth Myhra 2023-04-06 07:25:18 +02:00 committed by Linus Groh
parent d6cf9f5329
commit 4d87072201
42 changed files with 149 additions and 142 deletions

View file

@ -256,7 +256,7 @@ 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).release_value_but_fixme_should_propagate_errors();
auto content_loaded_event = DOM::Event::create(document->realm(), HTML::EventNames::DOMContentLoaded.to_deprecated_fly_string()).release_value_but_fixme_should_propagate_errors();
content_loaded_event->set_bubbles(true);
document->dispatch_event(content_loaded_event);
@ -297,7 +297,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).release_value_but_fixme_should_propagate_errors());
window->dispatch_event(DOM::Event::create(document->realm(), HTML::EventNames::load.to_deprecated_fly_string()).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.
@ -313,7 +313,7 @@ void HTMLParser::the_end()
document->set_page_showing(true);
// 11. Fire a page transition event named pageshow at window with false.
window->fire_a_page_transition_event(HTML::EventNames::pageshow, false);
window->fire_a_page_transition_event(HTML::EventNames::pageshow.to_deprecated_fly_string(), false);
// 12. Completely finish loading the Document.
document->completely_finish_loading();