Events
Templates for subscription/unsubscription:
sambaFrame.on('eventNameHere', (event) => {
//Execute your own custom logic here
});
sambaFrame.once('eventNameHere', (event) => {
//This will execute ONLY ONCE, even if the event happens a hundred times
});
const myCallback = (event) => {
//Execute your own custom logic here
});
sambaFrame.on('eventNameHere', myCallback);
//........................................
//Unsubscribe if you want at some point later
sambaFrame.off('eventNameHere', myCallback);Last updated