5 ms·
I don't think you're doing this right. The first .then receives a function, but the second .then executes function.apply at construction time and receives only
by DCoder 16y ago
I don't think you're doing this right. The first .then receives a function, but the second .then executes function.apply at construction time and receives only its result (null) as the callback.
Also, after understanding what's going on, existing solutions might be better than rolling your own: http://api.jquery.com/jQuery.proxy/ http://api.jquery.com/jQuery.proxy/ .