5 ms·
In ES5 you have Function.prototype.bind that returns a new function with this bound to whatever you want. You can also pass extra default arguments. On older br
by joske2 16y ago
In ES5 you have Function.prototype.bind that returns a new function with this bound to whatever you want. You can also pass extra default arguments. On older browsers you could use es5-shim for this functionality.
See https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind https://developer.mozilla.org/en/JavaScript/Reference/Global...