1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 05:37:44 +00:00

LibWeb: Add a proper FocusEvent interface for "focus" and "blur" events

This commit is contained in:
Andreas Kling 2022-02-07 00:04:10 +01:00
parent 386912c019
commit 627ad6c37c
9 changed files with 80 additions and 3 deletions

View file

@ -61,6 +61,7 @@
#include <LibWeb/Page/Page.h>
#include <LibWeb/SVG/TagNames.h>
#include <LibWeb/UIEvents/EventNames.h>
#include <LibWeb/UIEvents/FocusEvent.h>
#include <LibWeb/UIEvents/KeyboardEvent.h>
#include <LibWeb/UIEvents/MouseEvent.h>
@ -748,7 +749,7 @@ NonnullRefPtr<Event> Document::create_event(const String& interface)
} else if (interface_lowercase.is_one_of("event", "events")) {
event = Event::create("");
} else if (interface_lowercase == "focusevent") {
event = Event::create(""); // FIXME: Create FocusEvent
event = UIEvents::FocusEvent::create("");
} else if (interface_lowercase == "hashchangeevent") {
event = Event::create(""); // FIXME: Create HashChangeEvent
} else if (interface_lowercase == "htmlevents") {