- onceEvent<K>(el: null | string | void | HTMLElement | Window, eventType: K, callback: ((this: HTMLElement, ev: HTMLElementEventMap[K]) => any), capture??: boolean): void
-
Type Parameters
-
K extends keyof HTMLElementEventMap
Parameters
-
el: null | string | void | HTMLElement | Window
-
eventType: K
-
callback: ((this: HTMLElement, ev: HTMLElementEventMap[K]) => any)
-
- (this: HTMLElement, ev: HTMLElementEventMap[K]): any
-
Parameters
-
this: HTMLElement
-
ev: HTMLElementEventMap[K]
Returns any
-
Optional
capture: boolean = false
Returns void
一次性事件