Optionaloptions: boolean | AddEventListenerOptionsOptionaloptions: boolean | AddEventListenerOptionsOptionaloptions: boolean | EventListenerOptionsOptionaloptions: boolean | EventListenerOptionsProtecteddispatchThe dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
An
EventTargetwhose listeners are typed by an event mapM: the listener for"lost"receives aCustomEvent<GpuLostDetail>, and an unknown event name is a compile error. Subclasses declare the map and dispatch through TypedEventTarget.dispatch.