src/Common.js
/**
 * Creates a callback function with the correct "this".
 * Takes additiional arguments that will be added to the beginning of the
 * argument list that will be sent to the callback.
 * 
 * @param {Function} callback the callback function to be called.
 * @param {Object} that the wanted "this".
 * @returns {Function} a proper callback function.
 */
Creates a callback function with the correct "this".
Takes additiional arguments that will be added to the beginning of the
argument list that will be sent to the callback.

@param {Function} callback the callback function to be called.
@param {Object} that the wanted "this".
@returns {Function} a proper callback function.
Creates a callback function with the correct " this " . Takes additiional arguments that will be added to the beginning of the argument list that will be sent to the callback . @param { Function } callback the callback function to be called . @param { Object } that the wanted " this " . @returns { Function } a proper callback function .
function createCallbackWithArgs(callback, that) {
    var arg = arguments;
    delete arg[0];
    delete arg[1];
    return function() {
        callback.apply(that, arg.concat(arguments));
    };
}
function createCallbackWithArgs ( callback , that ) { var arg = arguments ; delete arg [ 0 ] ; delete arg [ 1 ] ; return function ( ) { callback . apply ( that , arg . concat ( arguments ) ) ; } ; }
Creates a callback function with the correct "this".
Creates a callback function with the correct " this " .