Closed
Bug 978070
Opened 11 years ago
Closed 11 years ago
Do not use document.write() to insert HTML code
Categories
(Bugzilla :: Bugzilla-General, enhancement)
Tracking
()
RESOLVED
FIXED
Bugzilla 5.0
People
(Reporter: LpSolit, Assigned: LpSolit)
References
()
Details
Attachments
(1 file)
|
9.90 KB,
patch
|
justdave
:
review+
|
Details | Diff | Splinter Review |
From what I know, document.write() blocks the rendering of HTML pages. It's (ab)used a lot in attachment/edit.html.tmpl, and in some other templates. We can reasonably assume that JS is enabled for all users, and if we really want to hide fields which need JS, then we should use the bz_default_hidden CSS class instead, and let JS remove this class if it's enabled.
| Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8383699 -
Flags: review?(justdave)
| Assignee | ||
Comment 2•11 years ago
|
||
For the record, the HTML5 spec explains why document.write() should not be used:
http://www.w3.org/TR/html5/webappapis.html#document.write%28%29
Comment 3•11 years ago
|
||
Comment on attachment 8383699 [details] [diff] [review]
patch, v1
Looks good to me. So much cleaner.
Also making more work for the YUI2->3 upgrade project ;) (Actually, these particular utilities likely haven't changed any).
Attachment #8383699 -
Flags: review?(justdave) → review+
Updated•11 years ago
|
Flags: approval+
| Assignee | ||
Comment 4•11 years ago
|
||
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
fd518e1..cf74a17 master -> master
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•