From 96a4e0dab2bd4f03a221ffb099faacb46cae923e Mon Sep 17 00:00:00 2001 From: Steve Orvell Date: Thu, 12 Sep 2013 09:43:40 -0700 Subject: [PATCH] adapt to CustomElement changes, entered/leftViewCallback; Polymer now supports entered/leftView as user entry points. --- src/instance/base.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/instance/base.js b/src/instance/base.js index 286fceafbc..e2b1768aff 100644 --- a/src/instance/base.js +++ b/src/instance/base.js @@ -47,6 +47,9 @@ this.ready(); this.created(); }, + enteredViewCallback: function() { + this._enteredDocumentCallback(); + }, insertedCallback: function() { this._enteredDocumentCallback(); }, @@ -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 initialization, oldest first parseElements: function(p) {