mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb: Implement WindowEventHandlers
This commit is contained in:
parent
ebf2184636
commit
3fe66bddf4
Notes:
sideshowbarker
2024-07-17 09:52:33 +09:00
Author: https://github.com/Lubrsi
Commit: 3fe66bddf4
Pull-request: https://github.com/SerenityOS/serenity/pull/14406
Reviewed-by: https://github.com/linusg
15 changed files with 186 additions and 9 deletions
|
@ -137,10 +137,11 @@ void WindowObject::initialize_global_object()
|
|||
// WebAssembly "namespace"
|
||||
define_direct_property("WebAssembly", heap().allocate<WebAssemblyObject>(*this, *this), JS::Attribute::Enumerable | JS::Attribute::Configurable);
|
||||
|
||||
// HTML::GlobalEventHandlers
|
||||
// HTML::GlobalEventHandlers and HTML::WindowEventHandlers
|
||||
#define __ENUMERATE(attribute, event_name) \
|
||||
define_native_accessor(#attribute, attribute##_getter, attribute##_setter, attr);
|
||||
ENUMERATE_GLOBAL_EVENT_HANDLERS(__ENUMERATE);
|
||||
ENUMERATE_WINDOW_EVENT_HANDLERS(__ENUMERATE);
|
||||
#undef __ENUMERATE
|
||||
|
||||
ADD_WINDOW_OBJECT_INTERFACES;
|
||||
|
@ -719,6 +720,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::name_setter)
|
|||
return JS::js_undefined(); \
|
||||
}
|
||||
ENUMERATE_GLOBAL_EVENT_HANDLERS(__ENUMERATE)
|
||||
ENUMERATE_WINDOW_EVENT_HANDLERS(__ENUMERATE)
|
||||
#undef __ENUMERATE
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue