W3cubDocs

/Deno

dispatchEvent

Dispatches an event in the global scope, synchronously invoking any registered event listeners for this event in the appropriate order. Returns false if event is cancelable and at least one of the event handlers which handled this event called Event.preventDefault(). Otherwise it returns true.

dispatchEvent(new Event('unload'));
function dispatchEvent(event: Event): boolean;
dispatchEvent(event: Event): boolean

Parameters

event: Event

Return Type

boolean

© 2018–2021 the Deno authors
https://doc.deno.land/deno/stable/~/dispatchEvent