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
[src]

§Parameters

§
type: string
[src]
§
options?: boolean | EventListenerOptions | undefined optional
[src]

§Return Type