Spec-Zone.ru › Deno 1

removeEventListener

Удалить ранее зарегистрированный обработчик событий из глобальной области видимости

const listener = () => { console.log('hello'); };
addEventListener('load', listener);
removeEventListener('load', listener);
function removeEventListener<K extends keyof WindowEventMap>(
type: K,
listener: (this: Window, ev: WindowEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;
function removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;
removeEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | EventListenerOptions): void

Удалить ранее зарегистрированный обработчик событий из глобальной области видимости

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

Параметры типов

K extends keyof WindowEventMap

Параметры

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

Тип возвращаемого значения

void
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void

Параметры

type: string
listener: EventListenerOrEventListenerObject
options?: boolean | EventListenerOptions optional

Тип возвращаемого значения

void

© 2018–2022 the Deno authors
https://doc.deno.land/deno/stable/~/removeEventListener

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API