mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +00:00
LibWeb: Port {HTML,UIEvents,XHR}::EventNames to new String
This commit is contained in:
parent
d6cf9f5329
commit
4d87072201
Notes:
sideshowbarker
2024-07-17 06:20:50 +09:00
Author: https://github.com/kennethmyhra
Commit: 4d87072201
Pull-request: https://github.com/SerenityOS/serenity/pull/17825
Reviewed-by: https://github.com/linusg ✅
Reviewed-by: https://github.com/trflynn89
42 changed files with 149 additions and 142 deletions
|
@ -124,7 +124,7 @@ void HTMLObjectElement::queue_element_task_to_run_object_representation_steps()
|
|||
|
||||
// 3. If that failed, fire an event named error at the element, then jump to the step below labeled fallback.
|
||||
if (!url.is_valid()) {
|
||||
dispatch_event(DOM::Event::create(realm(), HTML::EventNames::error).release_value_but_fixme_should_propagate_errors());
|
||||
dispatch_event(DOM::Event::create(realm(), HTML::EventNames::error.to_deprecated_fly_string()).release_value_but_fixme_should_propagate_errors());
|
||||
return run_object_representation_fallback_steps();
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ void HTMLObjectElement::queue_element_task_to_run_object_representation_steps()
|
|||
void HTMLObjectElement::resource_did_fail()
|
||||
{
|
||||
// 4.7. If the load failed (e.g. there was an HTTP 404 error, there was a DNS error), fire an event named error at the element, then jump to the step below labeled fallback.
|
||||
dispatch_event(DOM::Event::create(realm(), HTML::EventNames::error).release_value_but_fixme_should_propagate_errors());
|
||||
dispatch_event(DOM::Event::create(realm(), HTML::EventNames::error.to_deprecated_fly_string()).release_value_but_fixme_should_propagate_errors());
|
||||
run_object_representation_fallback_steps();
|
||||
}
|
||||
|
||||
|
@ -289,7 +289,7 @@ void HTMLObjectElement::run_object_representation_completed_steps(Representation
|
|||
// 4.11. If the object element does not represent its nested browsing context, then once the resource is completely loaded, queue an element task on the DOM manipulation task source given the object element to fire an event named load at the element.
|
||||
if (representation != Representation::NestedBrowsingContext) {
|
||||
queue_an_element_task(HTML::Task::Source::DOMManipulation, [&]() {
|
||||
dispatch_event(DOM::Event::create(realm(), HTML::EventNames::load).release_value_but_fixme_should_propagate_errors());
|
||||
dispatch_event(DOM::Event::create(realm(), HTML::EventNames::load.to_deprecated_fly_string()).release_value_but_fixme_should_propagate_errors());
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue