src/Emitter.js
function trigger(event) {
		var args;
		var anyListeners = false;
		if (this._emitterListeners != null) {
			args = slice.call(arguments, 1);
			if (this._emitterListeners.hasAny(event)) {
				anyListeners = true;
				notify(this._emitterListeners.getValues(event), Emitter.suppressErrors, args);
			}

			// navigate up the prototype chain emitting against the constructors.
			if (typeof event === 'object') {
				var last = event, proto = Object.getPrototypeOf(event);
				while (proto !== null && proto !== last) {
					if (this._emitterListeners.hasAny(proto.constructor)) {
						anyListeners = true;
						notify(this._emitterListeners.getValues(proto.constructor), Emitter.suppressErrors, arguments);
					}
					last = proto;
					proto = Object.getPrototypeOf(proto);
				}
			}
		}
		if (this._emitterMetaEventsOn === true && anyListeners === false && event instanceof metaEvents.DeadEvent === false) {
			this.trigger(new metaEvents.DeadEvent(event, args));
		}
		return anyListeners;
	}
function trigger(event) {
		var args;
		var anyListeners = false;
		if (this._emitterListeners != null) {
			args = slice.call(arguments, 1);
			if (this._emitterListeners.hasAny(event)) {
				anyListeners = true;
				notify(this._emitterListeners.getValues(event), Emitter.suppressErrors, args);
			}

			// navigate up the prototype chain emitting against the constructors.
			if (typeof event === 'object') {
				var last = event, proto = Object.getPrototypeOf(event);
				while (proto !== null && proto !== last) {
					if (this._emitterListeners.hasAny(proto.constructor)) {
						anyListeners = true;
						notify(this._emitterListeners.getValues(proto.constructor), Emitter.suppressErrors, arguments);
					}
					last = proto;
					proto = Object.getPrototypeOf(proto);
				}
			}
		}
		if (this._emitterMetaEventsOn === true && anyListeners === false && event instanceof metaEvents.DeadEvent === false) {
			this.trigger(new metaEvents.DeadEvent(event, args));
		}
		return anyListeners;
	}
function trigger ( event ) { var args ; var anyListeners = false ; if ( this . _emitterListeners != null ) { args = slice . call ( arguments , 1 ) ; if ( this . _emitterListeners . hasAny ( event ) ) { anyListeners = true ; notify ( this . _emitterListeners . getValues ( event ) , Emitter . suppressErrors , args ) ; } // navigate up the prototype chain emitting against the constructors. if ( typeof event === 'object' ) { var last = event , proto = Object . getPrototypeOf ( event ) ; while ( proto !== null && proto !== last ) { if ( this . _emitterListeners . hasAny ( proto . constructor ) ) { anyListeners = true ; notify ( this . _emitterListeners . getValues ( proto . constructor ) , Emitter . suppressErrors , arguments ) ; } last = proto ; proto = Object . getPrototypeOf ( proto ) ; } } } if ( this . _emitterMetaEventsOn === true && anyListeners === false && event instanceof metaEvents . DeadEvent === false ) { this . trigger ( new metaEvents . DeadEvent ( event , args ) ) ; } return anyListeners ; }
Fires an event, causing all the listeners registered for this event to be called.

If the event is an object, this will also call any listeners registered for
its class or any superclasses will also fire.

@param {*} event The event to fire.
@param {...*} [args] Optional arguments to pass to the listeners.
@returns {boolean} true if any listeners were notified, false otherwise.  This is not finalised and may change (particularly if we want to allow chaining).
Fires an event causing all the listeners registered for this event to be called .