4 ms·
And trivially easy to shim for older browsers. I would really recommend using Function.prototype.bind instead of the 'var self = this' or library bind functions
by huskyr 14y ago
And trivially easy to shim for older browsers. I would really recommend using Function.prototype.bind instead of the 'var self = this' or library bind functions (such as $.proxy), it's just the way it should be written :)
- jessaustin 14y agoTo confirm my understanding, would the erroneous line from the comment above be rewritten like: button.onclick = obj.func.bind(obj); So un-DRY! It's almost admirable, how blatant a hack this is.