1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 20:17:44 +00:00

LibWeb: Add MouseEvent JavaScript constructor

This commit is contained in:
Bastiaan van der Plaat 2024-01-19 18:53:05 +01:00 committed by Andreas Kling
parent 9aadc6c8c9
commit e2bc606eeb
5 changed files with 33 additions and 1 deletions

View file

@ -31,6 +31,7 @@ class MouseEvent : public UIEvent {
public:
[[nodiscard]] static JS::NonnullGCPtr<MouseEvent> create(JS::Realm&, FlyString const& event_name, MouseEventInit const& = {}, double page_x = 0, double page_y = 0, double offset_x = 0, double offset_y = 0);
static WebIDL::ExceptionOr<JS::NonnullGCPtr<MouseEvent>> create_from_platform_event(JS::Realm&, FlyString const& event_name, CSSPixelPoint screen, CSSPixelPoint page, CSSPixelPoint client, CSSPixelPoint offset, Optional<CSSPixelPoint> movement, unsigned button, unsigned buttons, unsigned modifiers);
static WebIDL::ExceptionOr<JS::NonnullGCPtr<MouseEvent>> construct_impl(JS::Realm&, FlyString const& event_name, MouseEventInit const&);
virtual ~MouseEvent() override;