diff --git a/src/dom_components/view/ComponentView.js b/src/dom_components/view/ComponentView.js index 956cf46d91..ffdb8ea3c1 100644 --- a/src/dom_components/view/ComponentView.js +++ b/src/dom_components/view/ComponentView.js @@ -32,6 +32,7 @@ module.exports = Backbone.View.extend({ this.listenTo(model, 'change:script', this.render); this.listenTo(model, 'change:content', this.updateContent); this.listenTo(model, 'change', this.handleChange); + this.listenTo(model, 'active', this.onActive); this.listenTo(classes, 'add remove change', this.updateClasses); $el.data('model', model); $el.data('collection', model.get('components')); @@ -45,6 +46,11 @@ module.exports = Backbone.View.extend({ */ init() {}, + /** + * Callback executed when the `active` event is triggered on component + */ + onActive() {}, + /** * Handle any property change * @private