1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:47:45 +00:00

LibWeb: Make UIEvents from the chrome the only default trusted Events

This commit is contained in:
Andrew Kaster 2024-01-18 12:54:28 -07:00 committed by Alexander Kalenik
parent 567bb0f6a2
commit 32fe7db69f
4 changed files with 10 additions and 4 deletions

View file

@ -648,7 +648,9 @@ JS::NonnullGCPtr<KeyboardEvent> KeyboardEvent::create_from_platform_event(JS::Re
event_init.bubbles = true;
event_init.cancelable = true;
event_init.composed = true;
return KeyboardEvent::create(realm, event_name, event_init);
auto event = KeyboardEvent::create(realm, event_name, event_init);
event->set_is_trusted(true);
return event;
}
bool KeyboardEvent::get_modifier_state(String const& key_arg)