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:
parent
ad04d7ac9b
commit
bbaa05fcf9
49 changed files with 206 additions and 203 deletions
|
@ -227,10 +227,10 @@ WebIDL::ExceptionOr<bool> EventTarget::dispatch_event_binding(Event& event)
|
|||
{
|
||||
// 1. If event’s 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 event’s isTrusted attribute to false.
|
||||
event.set_is_trusted(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue