off()

off(event: string, callback: function)

Unsubscribe from an event. There was a previous subscription made with on.

Sample unsubscription code

const modeChangedCallback = (event) => {
 //.....................................
};

sambaFrame.on('layoutModeChanged', modeChangedCallback);
//......................................................

//This will unsubscribe from the event, so the callback won't be invoked anymore
sambaFrame.off('layoutModeChanged', modeChangedCallback);

Last updated