Opened 11 years ago
Closed 10 years ago
#11609 closed defect (fixed)
remove usage of "with" in dojo/_base/html.js
Reported by: | Fredrik | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | HTML | Version: | 1.5 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
file: dojo/_base/html.js There's a block of code that uses the "with" syntax (in v1.5 at line #425). I use the Google Closure compiler to test-compile (i.e linting) most of my code and it doesn't accept "with". Most JS-literature I've read also recommend no using it. The gain in the actual code is also very small.
Fredrik
Attachments (1)
Change History (7)
comment:1 Changed 11 years ago by
comment:2 Changed 10 years ago by
Component: | Core → HTML |
---|---|
Owner: | changed from anonymous to Eugene Lazutkin |
comment:3 Changed 10 years ago by
Milestone: | tbd → 1.6 |
---|---|
Status: | new → assigned |
Changed 10 years ago by
Attachment: | base-with.patch added |
---|
Patch that should take care of these. (re-ran _base html tests, they all pass)
comment:4 Changed 10 years ago by
Milestone: | 1.6 → 1.7 |
---|
comment:5 Changed 10 years ago by
Type: | enhancement → defect |
---|
changing to defect, this is for code robustness, and not a new feature
comment:6 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
.. and there's also a "with" at about line 250 in dojo/_base/_loader/bootstrap.js
I would recommend that you run Dojo through Closure as part of the development process and strive for 0 errors and warnings. Easily finds undeclared vars, misspellings etc.
Fredrik