News for hackers. Stuff that matters.
Re:Why jQuery.proxy rocks my world by gmac on Wednesday April 27, 2011 @06:09AM (#2488956)
Since the app is apparently written using backbone.js, the _.bindAll method would be a neater solution here (as I see one of the commenters on the post points out).
Re:Why jQuery.proxy rocks my world by jashkenas on Wednesday April 27, 2011 @07:54AM (#2489141)
Right, You may want to prefer using _.bind and _.bindAll to jQuery.proxy, because the Underscore functions delegate to the native Function.prototype.bind, if it exists.
Re:Why jQuery.proxy rocks my world by makuchaku on Wednesday April 27, 2011 @06:23AM (#2488975)
Other parts of the app use Backbone. FBNotificationWatcher is a simple implementation based on JS.Class - http://jsclass.jcoglan.com/classes.html
Re:Why jQuery.proxy rocks my world by footless on Wednesday April 27, 2011 @07:32AM (#2489105)
JSClass seems to provide this too :) http://jsclass.jcoglan.com/binding.html
Re:Why jQuery.proxy rocks my world by cominatchu on Wednesday April 27, 2011 @09:05AM (#2489305)
If underscore is already loaded into the browser cache for other pages then you should be able to use it for free here then and not need jquery.proxy