Dear folks, Closure Compiler gives this warnings in Advanced Mode, underlining {this.
JSC_USED_GLOBAL_THIS: dangerous use of the global this object at line 200 character 33
hovers[i4].onfocus = function() {this.className += "Hovered";}
JSC_USED_GLOBAL_THIS: dangerous use of the global this object at line 201 character 32
hovers[i4].onblur = function() {this.className = this.className.replace(/Hove...
JSC_USED_GLOBAL_THIS: dangerous use of the global this object at line 201 character 49
hovers[i4].onblur = function() {this.className = this.className.replace(/Hove...
JSC_USED_GLOBAL_THIS: dangerous use of the global this object at line 218 character 38
buttons[i5].onmouseover = function() {this.className += "Hovered";}
Q1. Whats so dangerous about this?
Q2. Should I change this?
Q3. How do I improve/solve this code?
merci!
See Question&Answers more detail:os