← Back to index
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
🔗
listener: (this: Window, ev: WindowEventMap[K]) => any
🔗
options: boolean | EventListenerOptions