Skip to content

Commit

Permalink
Fix more closure warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Apr 27, 2017
1 parent d0f7812 commit f04d631
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 35 deletions.
42 changes: 7 additions & 35 deletions closure.log
Original file line number Diff line number Diff line change
Expand Up @@ -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.Element>}
^^^^^^^^^^^^^^^

/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);
^^^^

Expand Down Expand Up @@ -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
12 changes: 12 additions & 0 deletions lib/mixins/element-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -829,17 +829,29 @@

stack: [],

/**
* @param {*} inst Instance
* @this {hostStack}
*/
registerHost(inst) {
if (this.stack.length) {
let host = this.stack[this.stack.length-1];
host._enqueueClient(inst);
}
},

/**
* @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) {
Expand Down

0 comments on commit f04d631

Please sign in to comment.