src/event-emitter.js
function (eventName) {
				if (RUNTIME_CHECKS && typeof eventName !== 'string') {
					throw '"eventName" argument must be a string';
				}

				if (!this.__private || !this.__private.listeners) { return; }

				var listenersForEvent = this.__private.listeners[eventName];
				if (!listenersForEvent) { return; }

				for (var i = 0, n = listenersForEvent.length; i < n; ++i) {
					var listener = listenersForEvent[i];
					// Call the listener without the first item in the "arguments" array
					listener.call.apply(listener, arguments);
				}
			}
function (eventName) {
				if (RUNTIME_CHECKS && typeof eventName !== 'string') {
					throw '"eventName" argument must be a string';
				}

				if (!this.__private || !this.__private.listeners) { return; }

				var listenersForEvent = this.__private.listeners[eventName];
				if (!listenersForEvent) { return; }

				for (var i = 0, n = listenersForEvent.length; i < n; ++i) {
					var listener = listenersForEvent[i];
					// Call the listener without the first item in the "arguments" array
					listener.call.apply(listener, arguments);
				}
			}
function ( eventName ) { if ( RUNTIME_CHECKS && typeof eventName !== 'string' ) { throw '"eventName" argument must be a string' ; } if ( ! this . __private || ! this . __private . listeners ) { return ; } var listenersForEvent = this . __private . listeners [ eventName ] ; if ( ! listenersForEvent ) { return ; } for ( var i = 0 , n = listenersForEvent . length ; i < n ; ++ i ) { var listener = listenersForEvent [ i ] ; // Call the listener without the first item in the "arguments" array listener . call . apply ( listener , arguments ) ; } }
Emit an event. Callbacks will be called with the same arguments as this function was called with, except for the event name argument.
@instance
@arg {string} eventName - Identifier string for the event.
@arg {...any} [eventArguments] - Zero or more arguments that event listeners will be called with.
Emit an event . Callbacks will be called with the same arguments as this function was called with except for the event name argument .