Backbone View: Inherit and extend events from parent
问题 Backbone\'s documentation states: The events property may also be defined as a function that returns an events hash, to make it easier to programmatically define your events, as well as inherit them from parent views. How do you inherit a parent\'s view events and extend them? Parent View var ParentView = Backbone.View.extend({ events: { \'click\': \'onclick\' } }); Child View var ChildView = ParentView.extend({ events: function(){ ???? } }); 回答1: One way is: var ChildView = ParentView.extend