1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-02 23:42:13 +00:00

LibWeb: Make factory methods of UIEvents::UIEvent fallible

This affects calls to FocusEvent::create() since FocusEvent does not
implement its own create() method.
This commit is contained in:
Kenneth Myhra 2023-02-19 10:38:20 +01:00 committed by Andreas Kling
parent a401cff4e2
commit 587cf355ed
4 changed files with 12 additions and 12 deletions

View file

@ -65,9 +65,9 @@ static void run_focus_update_steps(Vector<JS::Handle<DOM::Node>> old_chain, Vect
// with related blur target as the related target.
if (blur_event_target) {
// FIXME: Implement the "fire a focus event" spec operation.
auto blur_event = UIEvents::FocusEvent::create(blur_event_target->realm(), HTML::EventNames::blur);
auto blur_event = UIEvents::FocusEvent::create(blur_event_target->realm(), HTML::EventNames::blur).release_value_but_fixme_should_propagate_errors();
blur_event->set_related_target(related_blur_target);
blur_event_target->dispatch_event(*blur_event);
blur_event_target->dispatch_event(blur_event);
}
}
@ -108,9 +108,9 @@ static void run_focus_update_steps(Vector<JS::Handle<DOM::Node>> old_chain, Vect
// with related focus target as the related target.
if (focus_event_target) {
// FIXME: Implement the "fire a focus event" spec operation.
auto focus_event = UIEvents::FocusEvent::create(focus_event_target->realm(), HTML::EventNames::focus);
auto focus_event = UIEvents::FocusEvent::create(focus_event_target->realm(), HTML::EventNames::focus).release_value_but_fixme_should_propagate_errors();
focus_event->set_related_target(related_focus_target);
focus_event_target->dispatch_event(*focus_event);
focus_event_target->dispatch_event(focus_event);
}
}
}