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

LibWeb: Support "useCapture" parameter to add/removeEventListener

This is not a complete implementation of API, since we're also supposed
to accept an options dictionary as the third argument. However, a lot of
web content uses the boolean variant, and it's trivial to support.
This commit is contained in:
Andreas Kling 2022-02-16 22:15:17 +01:00
parent e76e8e22b5
commit 9521f71944
3 changed files with 8 additions and 8 deletions

View file

@ -30,8 +30,8 @@ public:
virtual bool is_focusable() const { return false; }
void add_event_listener(FlyString const& type, RefPtr<IDLEventListener> callback);
void remove_event_listener(FlyString const& type, RefPtr<IDLEventListener> callback);
void add_event_listener(FlyString const& type, RefPtr<IDLEventListener> callback, bool use_capture = false);
void remove_event_listener(FlyString const& type, RefPtr<IDLEventListener> callback, bool use_capture = false);
virtual bool dispatch_event(NonnullRefPtr<Event>);
ExceptionOr<bool> dispatch_event_binding(NonnullRefPtr<Event>);