lost+found/src/dispatch.js
function _gpfDispatchEvent (event, params) {
    /*jshint validthis:true*/ // will be invoked as an object method
    var listeners = this._eventDispatcherListeners,
        eventObj,
        type,
        eventListeners;
    if (!listeners) {
        return this; // No listeners at all
    }
    if (event instanceof _GpfEvent) {
        eventObj = event;
        type = event.type;
    } else {
        type = event;
    }
    eventListeners = this._eventDispatcherListeners[type];
    if (undefined === eventListeners) {
        return this; // Nothing listeners for this event
    }
    if (!eventObj) {
        eventObj = new _GpfEvent(type, params, this);
    }
    _gpfTriggerListeners(eventObj, eventListeners);
    return eventObj;
}
function _gpfDispatchEvent (event, params) {
    /*jshint validthis:true*/ // will be invoked as an object method
    var listeners = this._eventDispatcherListeners,
        eventObj,
        type,
        eventListeners;
    if (!listeners) {
        return this; // No listeners at all
    }
    if (event instanceof _GpfEvent) {
        eventObj = event;
        type = event.type;
    } else {
        type = event;
    }
    eventListeners = this._eventDispatcherListeners[type];
    if (undefined === eventListeners) {
        return this; // Nothing listeners for this event
    }
    if (!eventObj) {
        eventObj = new _GpfEvent(type, params, this);
    }
    _gpfTriggerListeners(eventObj, eventListeners);
    return eventObj;
}
function _gpfDispatchEvent ( event , params ) { /*jshint validthis:true*/ // will be invoked as an object method var listeners = this . _eventDispatcherListeners , eventObj , type , eventListeners ; if ( ! listeners ) { return this ; // No listeners at all } if ( event instanceof _GpfEvent ) { eventObj = event ; type = event . type ; } else { type = event ; } eventListeners = this . _eventDispatcherListeners [ type ] ; if ( undefined === eventListeners ) { return this ; // Nothing listeners for this event } if ( ! eventObj ) { eventObj = new _GpfEvent ( type , params , this ) ; } _gpfTriggerListeners ( eventObj , eventListeners ) ; return eventObj ; }
Broadcast the event

@param {String|gpf.events.Event} event name or object
@param {Object} [params={}] event parameters
@return {gpf.events.Event}
Broadcast the event