Closed
Bug 874514
Opened 12 years ago
Closed 12 years ago
Make class="hidden" behave the same as hidden="true" for XUL elements
Categories
(Core :: XUL, defect, P2)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: benjamin, Assigned: benjamin)
Details
Attachments
(1 file)
483 bytes,
patch
|
Details | Diff | Splinter Review |
In working on the plugin doorhanger and I'd really like to be able to use class="hidden" instead of hidden="true" on some of the XUL elements. I have a patch which treats .hidden just like [hidden="true"].
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #752260 -
Flags: review?(neil)
Assignee | ||
Comment 2•12 years ago
|
||
r?Neil since Enn is gone for a bit
Assignee | ||
Updated•12 years ago
|
Priority: -- → P2
Comment 3•12 years ago
|
||
(In reply to Benjamin Smedberg [:bsmedberg] from comment #0)
> In working on the plugin doorhanger and I'd really like to be able to use
> class="hidden" instead of hidden="true" on some of the XUL elements.
Why?
Assignee | ||
Comment 4•12 years ago
|
||
Mostly because I have a inbred hate for the hidden="true" selector, which is inefficient compared with class-matching selectors. Also because I was already using .classList.add for tweaking other classes on the same objects, and it became a lot more readable to use classes than mucking with the attributes.
Comment 5•12 years ago
|
||
Those don't seem like very strong arguments to me, and adding such a generic class name to xul.css seems likely to cause compatibility issues.
For XUL elements, you can set .hidden = true, instead of using setAttribute (http://hg.mozilla.org/mozilla-central/annotate/daf809df7936/content/xul/content/src/nsXULElement.cpp#l1410).
Assignee | ||
Comment 6•12 years ago
|
||
Ah, I didn't know that, I thought it had to be in XBL. I'd love to eventually stop using the attribute, but for my scripting purposes I guess the .hidden property works ;-)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Comment 7•12 years ago
|
||
Comment on attachment 752260 [details] [diff] [review]
Make class="hidden" work, rev. 11
[I was minded to cancel (if not deny) the review anyway, for much the same reason as has already been discussed.]
Attachment #752260 -
Flags: review?(neil)
You need to log in
before you can comment on or make changes to this bug.
Description
•