diff --git a/src/instance/base.js b/src/instance/base.js index 7dd5088..d887ff6 100644 --- a/src/instance/base.js +++ b/src/instance/base.js @@ -45,32 +45,48 @@ // user entry point this.ready(); }, - enteredViewCallback: function() { + attachedCallback: function() { if (!this._elementPrepared) { this.prepareElement(); } this.cancelUnbindAll(true); // invoke user action + if (this.attached) { + this.attached(); + } + // TODO(sorvell): bc if (this.enteredView) { this.enteredView(); } }, - leftViewCallback: function() { + detachedCallback: function() { if (!this.preventDispose) { this.asyncUnbindAll(); } // invoke user action + if (this.detached) { + this.detached(); + } + // TODO(sorvell): bc if (this.leftView) { this.leftView(); } }, // TODO(sorvell): bc + enteredViewCallback: function() { + this.attachedCallback(); + }, + // TODO(sorvell): bc + leftViewCallback: function() { + this.detachedCallback(); + }, + // TODO(sorvell): bc enteredDocumentCallback: function() { - this.enteredViewCallback(); + this.attachedCallback(); }, // TODO(sorvell): bc leftDocumentCallback: function() { - this.leftViewCallback(); + this.detachedCallback(); }, // recursive ancestral initialization, oldest first parseDeclarations: function(p) {