4 ms·
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 o
by gmac 16y ago
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).
- makuchaku 16y agoOther parts of the app use Backbone. FBNotificationWatcher is a simple implementation based on JS.Class - http://jsclass.jcoglan.com/classes.html http://jsclass.jcoglan.com/classes.html
- footless 16y agoJSClass seems to provide this too :) http://jsclass.jcoglan.com/binding.html http://jsclass.jcoglan.com/binding.html
- cominatchu 16y agoIf 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
- jashkenas 16y agoRight, 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.