If you have something like
<div data-controller="foo">
<div data-controller="bar"></div>
</div>
ips.controller.register("foo", {
initialize: function() {
ips.controller.cleanContentsOf(this.scope);
}
});
The controller on bar will be initialized on the dead element, and never cleaned up:
ips.controller.register("bar", {
initialize: function() {
console.log(document.contains(this.scope[0])); // => false
},
destroy: function() {
consol