context.listen
ContextAPI 2| Signature | context.listen<K extends keyof HTMLElementEventMap>(target: HTMLElement, type: K, listener: (event: HTMLElementEventMap[K]) => void, options?: AddEventListenerOptions): Disposecontext.listen<K extends keyof DocumentEventMap>(target: Document, type: K, listener: (event: DocumentEventMap[K]) => void, options?: AddEventListenerOptions): Disposecontext.listen<K extends keyof WindowEventMap>(target: Window, type: K, listener: (event: WindowEventMap[K]) => void, options?: AddEventListenerOptions): Disposecontext.listen(target: EventTarget, type: string, listener: (event: Event) => void, options?: AddEventListenerOptions): Dispose |
|---|
| Take it from | const { listen } = useToolbar(); |
|---|
Parameters
| Parameter | Type | Description |
|---|
target | HTMLElement | |
type | K | |
listener | (event: HTMLElementEventMap[K]) => void | |
options | AddEventListenerOptions | Optional. |
Return Value
Availability
| Applicable versions | API 1 and higher |
|---|
| Bundleware | 0.3.0, build 2026.10.29 |
|---|