removeEventListener
You can unsubscribe to any of the ApiEvents you may have subscribed previously. If a previous callback
function used when adding the event listener is sent, it will disconnect that specific event, otherwise it disconnects all listeners created with eventName
removeEventListener(
eventName: ApiEvents,
callback?: (result: EventResponses) => void
): Promise<void>
Parameters
Description
eventName
ApiEvents Name of the event listener the method will remove.
callback (optional)
(result:
EventResponses
) => void
Callback function which specifies the event you are unsubscribing to. If not used unsubscribes all listeners created with eventName
Usage:
modelApi.removeEventListener(
"configurator_state_change"
);
Example
Last updated