diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-27 23:22:21 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-28 16:56:24 +0200 |
commit | 554c344ffeebc29c4d899b0a60813753a8c80093 (patch) | |
tree | af0390998317904a933947f21c0c9acd79069b1c /Userland/Libraries/LibWeb/Bindings | |
parent | 09153b899776fe38c271eef08f675a1b31d71cb9 (diff) | |
download | serenity-554c344ffeebc29c4d899b0a60813753a8c80093.zip |
LibWeb: Add a basic KeyboardEvent and fire "keydown" events :^)
Diffstat (limited to 'Userland/Libraries/LibWeb/Bindings')
-rw-r--r-- | Userland/Libraries/LibWeb/Bindings/EventWrapperFactory.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/EventWrapperFactory.cpp b/Userland/Libraries/LibWeb/Bindings/EventWrapperFactory.cpp index ccdb1204f3..cefc244352 100644 --- a/Userland/Libraries/LibWeb/Bindings/EventWrapperFactory.cpp +++ b/Userland/Libraries/LibWeb/Bindings/EventWrapperFactory.cpp @@ -9,6 +9,7 @@ #include <LibWeb/Bindings/CustomEventWrapper.h> #include <LibWeb/Bindings/EventWrapper.h> #include <LibWeb/Bindings/EventWrapperFactory.h> +#include <LibWeb/Bindings/KeyboardEventWrapper.h> #include <LibWeb/Bindings/MessageEventWrapper.h> #include <LibWeb/Bindings/MouseEventWrapper.h> #include <LibWeb/Bindings/PageTransitionEventWrapper.h> @@ -29,6 +30,8 @@ EventWrapper* wrap(JS::GlobalObject& global_object, DOM::Event& event) return static_cast<PageTransitionEventWrapper*>(wrap_impl(global_object, static_cast<HTML::PageTransitionEvent&>(event))); if (is<HTML::SubmitEvent>(event)) return static_cast<SubmitEventWrapper*>(wrap_impl(global_object, static_cast<HTML::SubmitEvent&>(event))); + if (is<UIEvents::KeyboardEvent>(event)) + return static_cast<KeyboardEventWrapper*>(wrap_impl(global_object, static_cast<UIEvents::KeyboardEvent&>(event))); if (is<UIEvents::MouseEvent>(event)) return static_cast<MouseEventWrapper*>(wrap_impl(global_object, static_cast<UIEvents::MouseEvent&>(event))); if (is<XHR::ProgressEvent>(event)) |