1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 10:07:43 +00:00

LibWeb: Mark abort event as trusted before dispatching it

This matches the behavior of Firefox and Chrome.
This commit is contained in:
Tim Ledbetter 2024-03-10 19:33:31 +00:00 committed by Andreas Kling
parent 3bec616893
commit 130f28cf50
3 changed files with 6 additions and 2 deletions

View file

@ -64,7 +64,9 @@ void AbortSignal::signal_abort(JS::Value reason)
m_abort_algorithms.clear();
// 5. Fire an event named abort at signal.
dispatch_event(Event::create(realm(), HTML::EventNames::abort));
auto abort_event = Event::create(realm(), HTML::EventNames::abort);
abort_event->set_is_trusted(true);
dispatch_event(abort_event);
}
void AbortSignal::set_onabort(WebIDL::CallbackType* event_handler)