Skip to main content

onEvent

Last updated 8/06/2026

Definition

is an optional host callback invoked by the
DimensionIQWidget
when the widget wishes to publish an application-defined event.

This callback is typically used to support multi-client synchronization scenarios, where a change made within one widget instance should be communicated to other connected clients.

The widget determines when an event should be emitted and what information should be included in the event payload. The host application is responsible for publishing the event to its chosen synchronization mechanism, such as REST API, WebSocket, Server-Sent Events (SSE), or message bus.

Function Signature

TypeScript
Function Signature
onEvent: (event: DIQ_Event) => void;

Callback Parameters

event
Type: DIQ_Event
Description: The

object from the widget.

Examples

onEvent