function removeEventListener

Remove a previously registered event listener from the global scope

const listener = () => { console.log('hello'); };
addEventListener('load', listener);
removeEventListener('load', listener);

Parameters

type: K[src]
listener: (this: Window, ev: WindowEventMap[K]) => any[src]
optional
options: boolean | EventListenerOptions
[src]