Skip to content

Commit

Permalink
- created now called at createdCallback time.
Browse files Browse the repository at this point in the history
 - removed deprecated entered|leftDocument; update to use entered|leftView.
  • Loading branch information
sorvell committed Oct 23, 2013
1 parent f28f584 commit ce8b3c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
23 changes: 2 additions & 21 deletions src/instance/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@
PolymerBase: true,
job: Polymer.job,
super: Polymer.super,
// TODO(sorvell): bc, created is currently a synonym for 'ready'.
// We should call this in createdCallback instead of at ready time or
// eliminate it.
// user entry point for element has had its createdCallback called
created: function() {
},
// user entry point for element has shadowRoot and is ready for
// api interaction
ready: function() {
},
createdCallback: function() {
this.created();
if (this.ownerDocument.defaultView || this.alwaysPrepare ||
preparingElements > 0) {
this.prepareElement();
Expand All @@ -45,8 +44,6 @@
preparingElements--;
// user entry point
this.ready();
// TODO(sorvell): bc
this.created();
},
enteredViewCallback: function() {
if (!this._elementPrepared) {
Expand All @@ -57,14 +54,6 @@
if (this.enteredView) {
this.enteredView();
}
// TODO(sorvell): bc
if (this.enteredDocument) {
this.enteredDocument();
}
},
// TODO(sorvell): bc
enteredDocumentCallback: function() {
this.enteredViewCallback();
},
leftViewCallback: function() {
if (!this.preventDispose) {
Expand All @@ -74,14 +63,6 @@
if (this.leftView) {
this.leftView();
}
// TODO(sorvell): bc
if (this.leftDocument) {
this.leftDocument();
}
},
// TODO(sorvell): bc
leftDocumentCallback: function() {
this.leftViewCallback();
},
// recursive ancestral <element> initialization, oldest first
parseDeclarations: function(p) {
Expand Down
4 changes: 2 additions & 2 deletions test/html/bind-object-repeat.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
enteredView: function() {
console.log(this.localName + ': enteredView!');
},
created: function() {
ready: function() {
console.log(this.localName + ': created!');
}
})
Expand All @@ -41,7 +41,7 @@
Polymer('x-bind-obj', {
testObj: null,
arr: null,
created: function() {
ready: function() {
this.testObj = {foo: 'single'};
this.arr = [
{foo: 'array 0'},
Expand Down

0 comments on commit ce8b3c7

Please sign in to comment.