js/core/EventDispatcher.js
function (eventType, callback, scope) {
                if (callback) {
                    scope = scope || this;
                    // get the list for the event
                    var list = this._eventHandlers[eventType] || (this._eventHandlers[eventType] = []);
                    // and push the callback function
                    if (callback instanceof EventDispatcher.EventHandler) {
                        list.push(callback);
                    } else {
                        list.push(new EventDispatcher.EventHandler(callback, scope));
                    }
                } else {
                    this.log('no eventHandler for "' + eventType + '"', "warn");
                }

                return this;
            }
function (eventType, callback, scope) {
                if (callback) {
                    scope = scope || this;
                    // get the list for the event
                    var list = this._eventHandlers[eventType] || (this._eventHandlers[eventType] = []);
                    // and push the callback function
                    if (callback instanceof EventDispatcher.EventHandler) {
                        list.push(callback);
                    } else {
                        list.push(new EventDispatcher.EventHandler(callback, scope));
                    }
                } else {
                    this.log('no eventHandler for "' + eventType + '"', "warn");
                }

                return this;
            }
function ( eventType , callback , scope ) { if ( callback ) { scope = scope || this ; // get the list for the event var list = this . _eventHandlers [ eventType ] || ( this . _eventHandlers [ eventType ] = [ ] ) ; // and push the callback function if ( callback instanceof EventDispatcher . EventHandler ) { list . push ( callback ) ; } else { list . push ( new EventDispatcher . EventHandler ( callback , scope ) ) ; } } else { this . log ( 'no eventHandler for "' + eventType + '"' , "warn" ) ; } return this ; }
Binds a callback and a scope to a given eventType

@param {String} eventType The name of the event
@param {Function} callback The callback function - signature callback({@link EventDispatcher.Event},[caller])
@param {Object} [scope]  This sets the scope for the callback function
Binds a callback and a scope to a given eventType