summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/GlobalEventHandlers.h
diff options
context:
space:
mode:
authorLuke Wilde <lukew@serenityos.org>2021-10-14 18:03:08 +0100
committerLinus Groh <mail@linusgroh.de>2022-02-08 17:47:44 +0000
commit5aacec65ab6da8feb5d2f29405ef4ed3cd89501f (patch)
tree2845921fb0bba58c40dc89acad0e9918657cc596 /Userland/Libraries/LibWeb/HTML/GlobalEventHandlers.h
parent3bb5c6207fbdbe80041bd603882063165b440e00 (diff)
downloadserenity-5aacec65ab6da8feb5d2f29405ef4ed3cd89501f.zip
LibWeb: Rewrite EventTarget to more closely match the spec
This isn't perfect (especially the global object situation in activate_event_handler), but I believe it's in a much more complete state now :^) This fixes the issue of crashing in prepare_for_ordinary_call with the `i < m_size` crash, as it now uses the IDL callback functions which requires the Environment Settings Object. The environment settings object for the callback is fetched at the time the callback is created, for example, WrapperGenerator gets the incumbent settings object for the callback at the time of wrapping. This allows us to remove passing in ScriptExecutionContext into EventTarget's constructor. With this, we can now drop ScriptExecutionContext.
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/GlobalEventHandlers.h')
-rw-r--r--Userland/Libraries/LibWeb/HTML/GlobalEventHandlers.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/GlobalEventHandlers.h b/Userland/Libraries/LibWeb/HTML/GlobalEventHandlers.h
index 9d8ee80e00..7fad45cc29 100644
--- a/Userland/Libraries/LibWeb/HTML/GlobalEventHandlers.h
+++ b/Userland/Libraries/LibWeb/HTML/GlobalEventHandlers.h
@@ -84,9 +84,9 @@ public:
virtual ~GlobalEventHandlers();
#undef __ENUMERATE
-#define __ENUMERATE(attribute_name, event_name) \
- void set_##attribute_name(HTML::EventHandler); \
- HTML::EventHandler attribute_name();
+#define __ENUMERATE(attribute_name, event_name) \
+ void set_##attribute_name(Optional<Bindings::CallbackType>); \
+ Bindings::CallbackType* attribute_name();
ENUMERATE_GLOBAL_EVENT_HANDLERS(__ENUMERATE)
#undef __ENUMERATE