Home > @i2analyze/notebook-sdk > dialog > IDialogApi > addEventListener
dialog.IDialogApi.addEventListener() method
Adds a listener for events that might affect the dialog.
Signature:
addEventListener<K extends keyof DialogEventMap>(type: K, listener: DialogEventMap[K], options?: DialogEventOptionsMap[K]): () => void;
Introduced: version 1.4
Type Parameters
Parameter | Type | Description |
---|---|---|
K | extends keyof DialogEventMap | The type of event to subscribe to. |
Parameters
Parameter | Type | Description |
---|---|---|
type | K | The type of event to subscribe to. |
listener | DialogEventMap[K] | A function to handle the event. |
options | DialogEventOptionsMap[K] | (Optional) An object that controls the behavior of the listener. |
Returns:
() => void
A function that can be called to remove the listener.