-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
I would like to propose an enhancement that I will develop to provide opt-in event bubbling for sub-views.
This gives event bubbling for sub-views, something which i know has been asked for before, with an opt in strategy so the we don't end up with adverse impact from listening to too many events.
subview: {
mysubView: {
bubbleEvents: 'change:render change:myValue',
prepareview: function (el) {
return new View({ el: el});
}
}
}
subview: {
mysubView: {
bubbleEvents: true, // or 'all'
prepareview: function (el) {
return new View({ el: el});
}
}
}
It will probably add a conditional call to
this.listenTo(subview, subview.bubbleEvents, this._getCachedEventBubblingHandler(subview));
inside _parseSubview, and may need some logic inside _parseSubviewOpts to turn truthy values into 'all'.
Metadata
Metadata
Assignees
Labels
No labels