Hacker News new | ask | show | jobs
by huskyr 4985 days 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 :)
1 comments

To 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.