Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Add support for attached/detachedCallbacks; users can now implement a…
Browse files Browse the repository at this point in the history
…ttached/detached; in addition, entered/leftView remain available for bc.
  • Loading branch information
sorvell committed Jan 6, 2014
1 parent b61ebcb commit 25e4df2
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions src/instance/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <element> initialization, oldest first
parseDeclarations: function(p) {
Expand Down

0 comments on commit 25e4df2

Please sign in to comment.