diff --git a/closure.log b/closure.log index 3e35217666..3b9f28a74d 100644 --- a/closure.log +++ b/closure.log @@ -665,55 +665,27 @@ Found : PolymerElement return super._parseTemplateContent(template, templateInfo, nodeInfo); ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_11.js:815: WARNING - Dangerous use of the global THIS object - if (this.stack.length) { - ^^^^ - -/polymer.html_script_11.js:816: WARNING - Dangerous use of the global THIS object - let host = this.stack[this.stack.length-1]; - ^^^^ - -/polymer.html_script_11.js:816: WARNING - Dangerous use of the global THIS object - let host = this.stack[this.stack.length-1]; - ^^^^ - -/polymer.html_script_11.js:822: WARNING - Dangerous use of the global THIS object - this.stack.push(inst); - ^^^^ - -/polymer.html_script_11.js:826: WARNING - Dangerous use of the global THIS object - let stackLen = this.stack.length; - ^^^^ - -/polymer.html_script_11.js:827: WARNING - Dangerous use of the global THIS object - if (stackLen && this.stack[stackLen-1] == inst) { - ^^^^ - -/polymer.html_script_11.js:828: WARNING - Dangerous use of the global THIS object - this.stack.pop(); - ^^^^ - -/polymer.html_script_11.js:850: WARNING - Type annotation references non-existent type Polymer.Element. +/polymer.html_script_11.js:862: WARNING - Type annotation references non-existent type Polymer.Element. * @type {Array} ^^^^^^^^^^^^^^^ -/polymer.html_script_11.js:858: WARNING - Property is never defined on prototype of type HTMLElement +/polymer.html_script_11.js:870: WARNING - Property is never defined on prototype of type HTMLElement console.log('[' + prototype.is + ']: registered') ^^^^^^^^^^^^ -/polymer.html_script_11.js:866: WARNING - Dangerous use of the global THIS object +/polymer.html_script_11.js:878: WARNING - Dangerous use of the global THIS object this.registrations.push(prototype); ^^^^ -/polymer.html_script_11.js:867: WARNING - Dangerous use of the global THIS object +/polymer.html_script_11.js:879: WARNING - Dangerous use of the global THIS object Polymer.log && this._regLog(prototype); ^^^^ -/polymer.html_script_11.js:874: WARNING - Dangerous use of the global THIS object +/polymer.html_script_11.js:886: WARNING - Dangerous use of the global THIS object this.registrations.forEach(this._regLog); ^^^^ -/polymer.html_script_11.js:874: WARNING - Dangerous use of the global THIS object +/polymer.html_script_11.js:886: WARNING - Dangerous use of the global THIS object this.registrations.forEach(this._regLog); ^^^^ @@ -1394,4 +1366,4 @@ externs/closure-types.js:759: WARNING - property toggle on interface Polymer_Arr Polymer_ArraySelectorMixin.prototype.toggle; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -0 error(s), 304 warning(s), 72.7% typed +0 error(s), 297 warning(s), 72.7% typed diff --git a/lib/mixins/element-mixin.html b/lib/mixins/element-mixin.html index 4e9fa3c7bc..62d9505d6a 100644 --- a/lib/mixins/element-mixin.html +++ b/lib/mixins/element-mixin.html @@ -829,6 +829,10 @@ stack: [], + /** + * @param {*} inst Instance + * @this {hostStack} + */ registerHost(inst) { if (this.stack.length) { let host = this.stack[this.stack.length-1]; @@ -836,10 +840,18 @@ } }, + /** + * @param {*} inst Instance + * @this {hostStack} + */ beginHosting(inst) { this.stack.push(inst); }, + /** + * @param {*} inst Instance + * @this {hostStack} + */ endHosting(inst) { let stackLen = this.stack.length; if (stackLen && this.stack[stackLen-1] == inst) {