javascript - How to inherit and add events in child in backbone.js -
i have tried this solustion couldn't working. situation there parent doesn't have event defined. can not make change in parent. can make changes in child modules need have 2 child modules both adding different event both independent of each other. means if install 1 of child modules event should work, if both installed both events should work. but doesn't seem work parent module.paymentscreenwidget = module.screenwidget.extend({ //it has no event defined code here.... https://github.com/odoo/odoo/blob/8.0/addons/point_of_sale/static/src/js/screens.js#l997 }); module 1 function pos_discount_cards_widgets(instance, module){ //module instance.point_of_sale var qweb = instance.web.qweb; var _t = instance.web._t; module.paymentscreenwidgetdsicount = module.paymentscreenwidget.extend({ events: function(){ return _.extend({},module.paymentscreenwidget.prototype.events,{ "change .discount-card-select": "selectcard"...