diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2021-10-01 20:48:21 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-10-01 20:14:45 +0200 |
commit | d426edb87fc2c74171419d80ee10f4538747a817 (patch) | |
tree | 4fc29ff3dd49a1df5863c975131f2bb9752466b0 | |
parent | 37586f61beeed4007760e31cdf85501a5bc779b1 (diff) | |
download | serenity-d426edb87fc2c74171419d80ee10f4538747a817.zip |
LibWeb: Create real Keybord & Message events in Document::create_event
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Document.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index f16a5bd203..393c7f3ddb 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -47,6 +47,7 @@ #include <LibWeb/HTML/HTMLImageElement.h> #include <LibWeb/HTML/HTMLScriptElement.h> #include <LibWeb/HTML/HTMLTitleElement.h> +#include <LibWeb/HTML/MessageEvent.h> #include <LibWeb/Layout/BlockFormattingContext.h> #include <LibWeb/Layout/InitialContainingBlock.h> #include <LibWeb/Layout/TreeBuilder.h> @@ -55,6 +56,7 @@ #include <LibWeb/Page/BrowsingContext.h> #include <LibWeb/Page/Page.h> #include <LibWeb/SVG/TagNames.h> +#include <LibWeb/UIEvents/KeyboardEvent.h> #include <LibWeb/UIEvents/MouseEvent.h> namespace Web::DOM { @@ -756,9 +758,9 @@ NonnullRefPtr<Event> Document::create_event(const String& interface) } else if (interface_lowercase == "htmlevents") { event = Event::create(""); } else if (interface_lowercase == "keyboardevent") { - event = Event::create(""); // FIXME: Create KeyboardEvent + event = UIEvents::KeyboardEvent::create(""); } else if (interface_lowercase == "messageevent") { - event = Event::create(""); // FIXME: Create MessageEvent + event = HTML::MessageEvent::create(""); } else if (interface_lowercase.is_one_of("mouseevent", "mouseevents")) { event = UIEvents::MouseEvent::create("", 0, 0, 0, 0); } else if (interface_lowercase == "storageevent") { |