Skip to content

Commit

Permalink
adapt to CustomElement changes, entered/leftViewCallback; Polymer now…
Browse files Browse the repository at this point in the history
… supports entered/leftView as user entry points.
  • Loading branch information
sorvell committed Sep 12, 2013
1 parent ae4b2aa commit 96a4e0d
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/instance/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
this.ready();
this.created();
},
enteredViewCallback: function() {
this._enteredDocumentCallback();
},
insertedCallback: function() {
this._enteredDocumentCallback();
},
Expand All @@ -59,27 +62,36 @@
if (this.inserted) {
this.inserted();
}
// invoke user action
if (this.enteredDocument) {
this.enteredDocument();
}
// invoke user action
if (this.enteredView) {
this.enteredView();
}
},
removedCallback: function() {
leftViewCallback: function() {
this._leftDocumentCallback();
},
leftDocumentCallback: function() {
this._leftDocumentCallback();
},
removedCallback: function() {
this._leftDocumentCallback();
},
_leftDocumentCallback: function() {
this.asyncUnbindAll();
// TODO(sorvell): bc
if (this.removed) {
this.removed();
}
// invoke user action
if (this.leftDocument) {
this.leftDocument();
}
// invoke user action
if (this.leftView) {
this.leftView();
}
},
// recursive ancestral <element> initialization, oldest first
parseElements: function(p) {
Expand Down

0 comments on commit 96a4e0d

Please sign in to comment.