Bundleware, Toolbar Script Reference

Last site update 30th October 2026

context.listen

ContextAPI 2
Signaturecontext.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 fromconst { listen } = useToolbar();

Parameters

ParameterTypeDescription
targetHTMLElement
typeK
listener(event: HTMLElementEventMap[K]) => void
optionsAddEventListenerOptionsOptional.

Return Value

TypeDispose

Availability

Applicable versionsAPI 1 and higher
Bundleware0.3.0, build 2026.10.30