Evaluation Options Editor API Methods
off()
Unregisters an event listener for the specified event.
You would want to use this method to stop running a callback function when the specified event fires, for example, when the component that handles the event is removed from your application.
Examples
// Stop logging the options when they change
const changeCallback = function (options) {
console.log('options have changed', options);
};
editor.on('change', changeCallback);
editor.off('change', changeCallback);
Arguments
-
event string
The name of the event to stop listening for.
Possible values
"change""reset"
-
callback function
The function that was registered as the callback for the event.
Return value
None (undefined).