3 ms·
IIRC, .bind(this) was used in the exact same way in mootools years and years ago, and maybe even in Prototype before that. Oh how I wish mootools had won the J
by newhouseb 16y ago
IIRC, .bind(this) was used in the exact same way in mootools years and years ago, and maybe even in Prototype before that.
Oh how I wish mootools had won the JS library war...
- jcampbell1 16y agoThe difference is that MooTools and Prototype modify the built in Function. Because of this, old versions of MooTools, and Prototype don't play nice with current browsers. This a a big reason jQuery won the war. function() {}.bind() is more convenient and cleaner, but $.proxy() will work regardless of whether Microsoft incorrectly implements a built in bind in their latest browser.