index.js
function(event, callback){
            let id =  windowManager.eventEmitter.listenerCount(event);

            windowManager.eventEmitter.addListener(event, function(event){
                callback.call(null, event.data, event.target, event.emittedBy);
            });

            return windowManager.eventEmitter.listeners(event)[id];
        }
function(event, callback){
            let id =  windowManager.eventEmitter.listenerCount(event);

            windowManager.eventEmitter.addListener(event, function(event){
                callback.call(null, event.data, event.target, event.emittedBy);
            });

            return windowManager.eventEmitter.listeners(event)[id];
        }
function ( event , callback ) { let id = windowManager . eventEmitter . listenerCount ( event ) ; windowManager . eventEmitter . addListener ( event , function ( event ) { callback . call ( null , event . data , event . target , event . emittedBy ) ; } ) ; return windowManager . eventEmitter . listeners ( event ) [ id ] ; }
Sets the callback to trigger whenever an event is emitted
@param event The name of the event
@param callback The callback to trigger, this callback will be given the data passed (if any), and
the name of the targeted window and finally the name of the window that triggered/emitted the event
@return the handler that add into the event listeners array
Sets the callback to trigger whenever an event is emitted