Noodl.eventEmitter.emit(eventName, data)
Send an event. Works well together with Event Receivers.
Noodl.eventEmitter.emit('event name', {
value: 'hello',
someOtherValue: 100,
});
Noodl.eventEmitter.on(eventName, callback(data))
Noodl.eventEmitter.once(eventName, callback(data))
Receive an event. Works together with Event Senders
Noodl.eventEmitter.on('event name', function (eventData) {
console.log(eventData.value);
});