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

LibWeb: Move DOMException from DOM/ to WebIDL/

This commit is contained in:
Linus Groh 2022-09-25 17:28:46 +01:00
parent ad04d7ac9b
commit bbaa05fcf9
49 changed files with 206 additions and 203 deletions

View file

@ -227,10 +227,10 @@ WebIDL::ExceptionOr<bool> EventTarget::dispatch_event_binding(Event& event)
{
// 1. If events dispatch flag is set, or if its initialized flag is not set, then throw an "InvalidStateError" DOMException.
if (event.dispatched())
return DOM::InvalidStateError::create(global_object(), "The event is already being dispatched.");
return WebIDL::InvalidStateError::create(global_object(), "The event is already being dispatched.");
if (!event.initialized())
return DOM::InvalidStateError::create(global_object(), "Cannot dispatch an uninitialized event.");
return WebIDL::InvalidStateError::create(global_object(), "Cannot dispatch an uninitialized event.");
// 2. Initialize events isTrusted attribute to false.
event.set_is_trusted(false);