diff --git a/src/instance/base.js b/src/instance/base.js index 5ee15a26cf..880595d320 100644 --- a/src/instance/base.js +++ b/src/instance/base.js @@ -145,6 +145,13 @@ if (this.attributeChanged) { this.attributeChanged.apply(this, arguments); } + }, + onMutation: function(node, listener) { + var observer = new MutationObserver(function() { + listener.call(this, observer); + observer.disconnect(); + }.bind(this)); + observer.observe(node, {childList: true, subtree: true}); } };