Tutorial: frame.removeEventListener

frame.removeEventListener

Removes a listener to the referenced frame

Example

const listener = (info) => console.log(info);
const errorCallback = (errStr, err) => console.log(err);
const myFrame = fin.desktop.Frame.wrap('OpenfinPOC','2407fac7-25dc-4bba-9add-cd09b2fc078c');

myFrame.addEventListener('disconnected', listener, () => {

    // removes the listener right after it is registered
    myFrame.removeEventListener('disconnected', listener, () => {
        console.log('listener removed');
    });
}, errorCallback);