I\'m looking for a way to accomplish a certain task and that is, going from
jQuery.when.apply( null, promiseArray ).done(...)
to
bind accepts a variable number of arguments, so you can partially apply a method. So, instead of:
var when = Function.prototype.apply.bind( $.when );
Do this:
var when = Function.prototype.apply.bind( $.when , null );
And updated jsfiddle: http://jsfiddle.net/pp26L/2/
This should work:
when = Function.prototype.apply.bind( $.when, null);
You just bind (or curry, if you prefer) the first argument of .bind
and fix it to null
.
Fiddle.