removeFrameEventListener()

removeFrameEventListener(eventName, target, listener)

Removes a previously attached frame event listener (with addFrameEventListener).

const keyUpEventListener = (payload) => {
   console.log('keyup', payload)
};
sambaFrame.addFrameEventListener('keyup', 'window', keyUpEventListener);

//At some point later when you no longer need the listener
sambaFrame.removeFrameEventListener('keyup', 'window', keyUpEventListener);

Sample use case: You may want to remove the listener after you no longer need it.

removeFrameEventListener is used in conjunction with the addFrameEventListener

Last updated