Home > @i2analyze/notebook-sdk > toolview > IToolView > addEventListener
toolview.IToolView.addEventListener() method
Adds an event listener for tool view changes.
Signature:
addEventListener<K extends keyof ToolViewEventMap>(type: K, listener: ToolViewEventMap[K], options?: ToolViewEventOptionsMap[K]): () => void;
Introduced: version 1.0
Type Parameters
Parameter | Type | Description |
---|---|---|
K | extends keyof ToolViewEventMap | The type of event to subscribe to. |
Parameters
Parameter | Type | Description |
---|---|---|
type | K | The type of event to subscribe to. |
listener | ToolViewEventMap[K] | A function to handle the event. |
options | ToolViewEventOptionsMap[K] | (Optional) An object that controls the behavior of the listener. |
Returns:
() => void
A function that can be called to remove the listener.