mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Only make certain <body> and <frameset> events apply to Window
Previously we forwarded all event handler attributes to Window from these two elements, however, we are only supposed to forward blur, error, focus, load, resize and scroll.
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 09:52:38 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/ebf2184636 Pull-request: https://github.com/SerenityOS/serenity/pull/14406 Reviewed-by: https://github.com/linusg
@@ -16,14 +16,14 @@
|
||||
namespace Web::HTML {
|
||||
|
||||
#undef __ENUMERATE
|
||||
#define __ENUMERATE(attribute_name, event_name) \
|
||||
void GlobalEventHandlers::set_##attribute_name(Optional<Bindings::CallbackType> value) \
|
||||
{ \
|
||||
global_event_handlers_to_event_target().set_event_handler_attribute(event_name, move(value)); \
|
||||
} \
|
||||
Bindings::CallbackType* GlobalEventHandlers::attribute_name() \
|
||||
{ \
|
||||
return global_event_handlers_to_event_target().event_handler_attribute(event_name); \
|
||||
#define __ENUMERATE(attribute_name, event_name) \
|
||||
void GlobalEventHandlers::set_##attribute_name(Optional<Bindings::CallbackType> value) \
|
||||
{ \
|
||||
global_event_handlers_to_event_target(event_name).set_event_handler_attribute(event_name, move(value)); \
|
||||
} \
|
||||
Bindings::CallbackType* GlobalEventHandlers::attribute_name() \
|
||||
{ \
|
||||
return global_event_handlers_to_event_target(event_name).event_handler_attribute(event_name); \
|
||||
}
|
||||
ENUMERATE_GLOBAL_EVENT_HANDLERS(__ENUMERATE)
|
||||
#undef __ENUMERATE
|
||||
|
||||
Reference in New Issue
Block a user