function removeEventListener
Jump to headingremoveEventListener<K extends keyof WindowEventMap>(type: K,listener: (this: Window,ev: WindowEventMap[K],) => any,options?: boolean | EventListenerOptions,): void
Remove a previously registered event listener from the global scope
const listener = () => { console.log('hello'); };
addEventListener('load', listener);
removeEventListener('load', listener);
Type Parameters Jump to heading
Jump to headingK extends keyof WindowEventMap
Parameters Jump to heading
Jump to headingtype: K
Jump to headinglistener: (this: Window,ev: WindowEventMap[K],) => any
optional
Jump to headingoptions: boolean | EventListenerOptions
Return Type Jump to heading
void
Jump to headingremoveEventListener(): void
Parameters Jump to heading
Jump to headingtype: string
optional
Jump to headingoptions: boolean | EventListenerOptions
Return Type Jump to heading
void