summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/DOM/EventTarget.h
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-04-10 18:51:29 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-10 21:00:04 +0200
commit9d2635d94bbb8ef6233c3d7292d107df72d17bec (patch)
tree76e128744f60836ca3599bcf6402950c45eceadf /Userland/Libraries/LibWeb/DOM/EventTarget.h
parent2172e51246283311b8e699212baa9a5283b98737 (diff)
downloadserenity-9d2635d94bbb8ef6233c3d7292d107df72d17bec.zip
LibWeb: Support nullable EventListener parameters in WrapperGenerator
The internal C++ function will now receive a RefPtr<EventListener> for 'EventListener?' and a NonnullRefPtr<EventListener> for 'EventListener'. Examples of this are addEventListener() and removeEventListener(), which both have nullable callback parameters.
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/EventTarget.h')
-rw-r--r--Userland/Libraries/LibWeb/DOM/EventTarget.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/EventTarget.h b/Userland/Libraries/LibWeb/DOM/EventTarget.h
index af1a1d7b0c..d74d633fec 100644
--- a/Userland/Libraries/LibWeb/DOM/EventTarget.h
+++ b/Userland/Libraries/LibWeb/DOM/EventTarget.h
@@ -45,8 +45,8 @@ public:
void ref() { ref_event_target(); }
void unref() { unref_event_target(); }
- void add_event_listener(const FlyString& event_name, NonnullRefPtr<EventListener>);
- void remove_event_listener(const FlyString& event_name, NonnullRefPtr<EventListener>);
+ void add_event_listener(const FlyString& event_name, RefPtr<EventListener>);
+ void remove_event_listener(const FlyString& event_name, RefPtr<EventListener>);
void remove_from_event_listener_list(NonnullRefPtr<EventListener>);