Methods
addEventListener
- addEventListener<K>(el: Window, type: K, listener: ((this: Window, ev: WindowEventMap[K]) => unknown), options?: boolean | AddEventListenerOptions, disposerID?: string): string
-
Type Parameters
-
K extends keyof WindowEventMap
Parameters
-
el: Window
-
type: K
-
listener: ((this: Window, ev: WindowEventMap[K]) => unknown)
-
- (this: Window, ev: WindowEventMap[K]): unknown
-
Parameters
-
this: Window
-
ev: WindowEventMap[K]
Returns unknown
-
Optional
options: boolean | AddEventListenerOptions
-
Optional
disposerID: string
Returns string
- addEventListener<K>(el: Document, type: K, listener: ((this: Document, ev: DocumentEventMap[K]) => unknown), options?: boolean | AddEventListenerOptions, disposerID?: string): string
-
Type Parameters
-
K extends keyof DocumentEventMap
Parameters
-
el: Document
-
type: K
-
listener: ((this: Document, ev: DocumentEventMap[K]) => unknown)
-
- (this: Document, ev: DocumentEventMap[K]): unknown
-
Parameters
-
this: Document
-
ev: DocumentEventMap[K]
Returns unknown
-
Optional
options: boolean | AddEventListenerOptions
-
Optional
disposerID: string
Returns string
- addEventListener<K>(el: HTMLElement, type: K, listener: ((this: HTMLElement, ev: HTMLElementEventMap[K]) => unknown), options?: boolean | AddEventListenerOptions, disposerID?: string): string
-
Type Parameters
-
K extends keyof HTMLElementEventMap
Parameters
-
el: HTMLElement
-
type: K
-
listener: ((this: HTMLElement, ev: HTMLElementEventMap[K]) => unknown)
-
- (this: HTMLElement, ev: HTMLElementEventMap[K]): unknown
-
Parameters
-
this: HTMLElement
-
ev: HTMLElementEventMap[K]
Returns unknown
-
Optional
options: boolean | AddEventListenerOptions
-
Optional
disposerID: string
Returns string
- addEventListener<K>(el: MediaQueryList, type: K, listener: ((this: HTMLElement, ev: MediaQueryListEventMap[K]) => unknown), options?: boolean | AddEventListenerOptions, disposerID?: string): string
-
Parameters
-
el: MediaQueryList
-
type: K
-
listener: ((this: HTMLElement, ev: MediaQueryListEventMap[K]) => unknown)
-
- (this: HTMLElement, ev: MediaQueryListEventMap[K]): unknown
-
Parameters
-
this: HTMLElement
-
ev: MediaQueryListEventMap[K]
Returns unknown
-
Optional
options: boolean | AddEventListenerOptions
-
Optional
disposerID: string
Returns string
flush
- flush(disposerID: string): void
-
Returns void
flushAll
- flushAll(): void
-
Returns void
genUID
- genUID(): string
-
Returns string
setInterval
- setInterval(handler: (() => void), timeout: number, disposerID?: string): string
-
Parameters
-
handler: (() => void)
-
timeout: number
-
disposerID: string = ...
Returns string
setTimeout
- setTimeout(handler: (() => void), timeout: number, disposerID?: string): string
-
Parameters
-
handler: (() => void)
-
timeout: number
-
disposerID: string = ...
Returns string
All disposers. Use this only when you know what you are doing.