Fix ClosureJS error#209
Fix ClosureJS error#209peternewman merged 7 commits intoOpenLightingProject:masterfrom FloEdelmann:closure
Conversation
| app.MessageField.prototype.enterDocument = function() { | ||
| app.MessageField.superClass_.enterDocument.call(this); | ||
|
|
||
| var tt = ( |
There was a problem hiding this comment.
I always thought this was an object at first glance, so I changed it to make it more clear that it's a string.
There was a problem hiding this comment.
I wondered if that was a linter fix, but perhaps not looking at the blame.
peternewman
left a comment
There was a problem hiding this comment.
There's one more outstanding use of setHtml here
rdm-app/templates/browse_models.tmpl
Line 103 in 5980e12
js_src/pid_display.js
Outdated
| 'Type: ' + this._field_info['type'] + '<br>' + | ||
| 'Name: ' + this._field_info['name'] + '<br>'); | ||
| var tt = 'Type: ' + this._field_info['type'] + '<br>'; | ||
| tt += 'Name: ' + this._field_info['name'] + '<br>'; |
There was a problem hiding this comment.
I don't know how good the optimiser is, but this would be slightly better if it was just one concat of strings across two lines I think, or does it then throw an error and is that what the brackets were for?
|
Hi @FloEdelmann , See also #210 which stops it moaning about closure code we can't control. |
|
I wonder if
Is because of the slightly odd dependency tree? We define MessageStructure: Then it's update method (which refers to MessageGroup's update method): Finally we define MessageGroup as a child of MessageStructure: So it's all a bit circular! It might be worth trying to move the MessageGroup stuff above the update stuff and see if that fixes the warning. |
|
This one:
Looks like a typo, or something that never got updated. Compare the JS Doc, to the code: In which case it's been wrong since the beginning: Anyway I suspect they should be: Thoughts @nomis52 ? |
|
Moving |
js_src/pid_display.js
Outdated
| 'Type: ' + this._field_info['type'] + '<br>' + | ||
| 'Name: ' + this._field_info['name'] + '<br>'); | ||
| var tt = 'Type: ' + this._field_info['type'] + '<br>' + | ||
| 'Name: ' + this._field_info['name'] + '<br>'; |
There was a problem hiding this comment.
Can we space the 'Name: ' bit to align below Type please.
peternewman
left a comment
There was a problem hiding this comment.
LGTM. While it doesn't fix all the outstanding errors it certainly looks to improve things!
This fixes the error mentioned in #128 (comment).
There are two warnings left when running
grunt closure-compiler:I don't know enough of their purpose to decide what to do with them.