diff --git a/src/lib/render-status.html b/src/lib/render-status.html
index 01fed70155..eb687cf377 100644
--- a/src/lib/render-status.html
+++ b/src/lib/render-status.html
@@ -49,33 +49,34 @@
});
},
- _afterFirstRenderQueue: [],
+ _afterNextRenderQueue: [],
- _waitingAfterFirstRender: false,
+ _waitingNextRender: false,
- afterFirstRender: function(element, fn, args) {
- if (!this._waitingAfterFirstRender) {
- this._waitingAfterFirstRender = true;
- this.whenReady(this._flushAfterFirstRender);
+ afterNextRender: function(element, fn, args) {
+ if (!this._waitingNextRender) {
+ this._waitingNextRender = true;
+ this.whenReady(this._flushAfterNextRender);
}
- this._afterFirstRenderQueue.push([element, fn, args]);
+ this._afterNextRenderQueue.push([element, fn, args]);
},
- _flushAfterFirstRender: function() {
+ _flushAfterNextRender: function() {
// we want to defer flush until just after the next paint.
requestAnimationFrame(function() {
- setTimeout(Polymer.RenderStatus.__flushAfterFirstRender);
+ setTimeout(Polymer.RenderStatus.__flushAfterNextRender);
});
},
- __flushAfterFirstRender: function() {
+ __flushAfterNextRender: function() {
+ // called without context so force here.
var self = Polymer.RenderStatus;
- self._waitingAfterFirstRender = false;
- for (var i=0, h; i < self._afterFirstRenderQueue.length; i++) {
- h = self._afterFirstRenderQueue[i];
+ self._waitingNextRender = false;
+ for (var i=0, h; i < self._afterNextRenderQueue.length; i++) {
+ h = self._afterNextRenderQueue[i];
h[1].apply(h[0], h[2] || Polymer.nar);
};
- self._afterFirstRenderQueue = [];
+ self._afterNextRenderQueue = [];
}
};