W3cubDocs

/Deno

removeEventListener

Remove a previously registered event listener from the global scope

const lstnr = () => { console.log('hello'); };
addEventListener('load', lstnr);
removeEventListener('load', lstnr);
function removeEventListener(
type: string,
options?: boolean | EventListenerOptions | undefined,
): void;
removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions | undefined): void

Parameters

type: string
options?: boolean | EventListenerOptions | undefined optional

Return Type

void