1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:48:12 +00:00

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.
This commit is contained in:
Kenneth Myhra 2023-02-14 22:43:17 +01:00 committed by Linus Groh
parent 0d9076c9f5
commit c120c46acc
20 changed files with 85 additions and 85 deletions

View file

@ -278,7 +278,7 @@ bool HTMLElement::fire_a_synthetic_pointer_event(DeprecatedFlyString const& type
// 1. Let event be the result of creating an event using PointerEvent.
// 2. Initialize event's type attribute to e.
// FIXME: Actually create a PointerEvent!
auto event = UIEvents::MouseEvent::create(realm(), type);
auto event = UIEvents::MouseEvent::create(realm(), type).release_value_but_fixme_should_propagate_errors();
// 3. Initialize event's bubbles and cancelable attributes to true.
event->set_bubbles(true);
@ -300,7 +300,7 @@ bool HTMLElement::fire_a_synthetic_pointer_event(DeprecatedFlyString const& type
// FIXME: 8. event's getModifierState() method is to return values appropriately describing the current state of the key input device.
// 9. Return the result of dispatching event at target.
return target.dispatch_event(*event);
return target.dispatch_event(event);
}
// https://html.spec.whatwg.org/multipage/interaction.html#dom-click