LibWeb/UIEvents: Implement TextEvent

This commit is contained in:
Jamie Mansfield 2024-10-05 14:44:59 +01:00 committed by Andreas Kling
commit f610a12671
Notes: github-actions[bot] 2024-10-08 09:46:36 +00:00
10 changed files with 102 additions and 1 deletions

View file

@ -133,6 +133,7 @@
#include <LibWeb/UIEvents/FocusEvent.h>
#include <LibWeb/UIEvents/KeyboardEvent.h>
#include <LibWeb/UIEvents/MouseEvent.h>
#include <LibWeb/UIEvents/TextEvent.h>
#include <LibWeb/WebIDL/AbstractOperations.h>
#include <LibWeb/WebIDL/DOMException.h>
#include <LibWeb/WebIDL/ExceptionOr.h>
@ -1784,7 +1785,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Event>> Document::create_event(StringView i
} else if (Infra::is_ascii_case_insensitive_match(interface, "svgevents"sv)) {
event = Event::create(realm, FlyString {});
} else if (Infra::is_ascii_case_insensitive_match(interface, "textevent"sv)) {
event = Event::create(realm, FlyString {}); // FIXME: Create TextEvent
event = UIEvents::TextEvent::create(realm, FlyString {});
} else if (Infra::is_ascii_case_insensitive_match(interface, "touchevent"sv)) {
event = Event::create(realm, FlyString {}); // FIXME: Create TouchEvent
} else if (Infra::is_ascii_case_insensitive_match(interface, "uievent"sv)