Interface IEventListenerSource
Methods
addEventListener
- addEventListener<K>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void
-
Type parameters
-
K: keyof HTMLElementEventMap
Parameters
-
type: K
-
listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any
-
- (this: HTMLElement, ev: HTMLElementEventMap[K]): any
-
Parameters
-
this: HTMLElement
-
ev: HTMLElementEventMap[K]
Returns any
-
Optional options: boolean | AddEventListenerOptions
Returns void
removeEventListener
- removeEventListener<K>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void
-
Type parameters
-
K: keyof HTMLElementEventMap
Parameters
-
type: K
-
listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any
-
- (this: HTMLElement, ev: HTMLElementEventMap[K]): any
-
Parameters
-
this: HTMLElement
-
ev: HTMLElementEventMap[K]
Returns any
-
Optional options: boolean | EventListenerOptions
Returns void
Defines the interface to a type which sources events, such as an HTML5 element