Merge "Fix function naming conventions, comments and whitespace"

This commit is contained in:
jenkins-bot 2013-09-18 00:58:43 +00:00 committed by Gerrit Code Review
commit 1baf90130a

View file

@ -30,19 +30,32 @@
*
* To fire after-event listeners promptly, the EventSequencer may need to
* listen to some events for which it has no registered on-event or
* event-event listeners. For instance, to ensure an after-keydown listener
* after-event listeners. For instance, to ensure an after-keydown listener
* is be fired before the native keyup action, you must include both
* 'keydown' and 'keyup' in the eventNames Array.
*
* @constructor
* @param {string[]} eventNames List of event Names to listen to
*/
ve.EventSequencer = function ( eventNames ) {
var i, len, eventName, makeEventHandler, eventSequencer = this;
ve.EventSequencer = function VeEventSequencer( eventNames ) {
var i, len, eventName, eventSequencer = this;
this.$node = null;
this.eventNames = eventNames;
this.eventHandlers = {};
/**
* Generate an event handler for a specific event
*
* @private
* @param {string} eventName The event's name
* @returns {Function} An event handler
*/
function makeEventHandler( eventName ) {
return function ( ev ) {
return eventSequencer.onEvent( eventName, ev );
};
}
/**
* @property {Object[]}
* - id {number} Id for setTimeout
@ -62,12 +75,6 @@ ve.EventSequencer = function ( eventNames ) {
*/
this.afterListenersForEvent = {};
makeEventHandler = function ( eventName ) {
return function ( ev ) {
return eventSequencer.onEvent( eventName, ev );
};
};
for ( i = 0, len = eventNames.length; i < len; i++ ) {
eventName = eventNames[i];
this.onListenersForEvent[eventName] = [];