I'm trying to determine what function a Backbone.js model .on event is bound to. For example, given that I have a view with:
this.model.on('change', this.render, this);
I'd like to be able to programmatically determine that when there is a model change the render function will be called.
I've looked at Backbone.js source and it appears that the bindings are stored in the ._callbacks. In ._callbacks I can determine the event at which the model is bound to. From the above example I can determine that the model has the change event bound. However, is it possible to determine that the model is bound to the render function of the view?
For those curious, I am trying to extend the render function of a view, which I currently have working. However, when I extend/reassign the render function, it breaks the event bindings of the model.
Thanks!