Closed
Bug 191092
Opened 22 years ago
Closed 8 years ago
Can't use |in| operator on collections or node lists
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: neil, Unassigned)
References
()
Details
If you click on the URL provided you will see a false alert although any
document contains at least one tag. This applies to HTML collections and XUL
node lists.
Updated•22 years ago
|
Summary: Can't use operator in on collections or node lists → Can't use |in| operator on collections or node lists
Comment 2•22 years ago
|
||
Yeah, I bet it is... feel free to push this over on my plate if nobody else
wants it. But do we really care? Are there real sites out there that breaks?
Sure it should be fixed, but how urgent is it? Does this work in IE?
Comment 3•22 years ago
|
||
> Does this work in IE?
Yes - IE6 returns 'true' on the above javascript:URL
javascript:alert(0 in document.getElementsByTagName('*'))
| Reporter | ||
Comment 4•22 years ago
|
||
The rationale:
editorUtilities.js currently has the code
var editorList = tmpWindow.document.getElementsByTagName("editor");
if (editorList && editorList.length > 0)
return editorList[0];
Now editorList.length > 0 is expensive, but editorList[0] != null is a JS strict
warning if the tmpWindow has no editor elements. bz pointed out that there's a
workaround of editorList.item(0) != null but 0 in editorList would be neater.
Comment 5•22 years ago
|
||
With some definition of 'neater', maybe... :-)
Updated•19 years ago
|
Assignee: dbradley → nobody
Updated•19 years ago
|
QA Contact: pschwartau → xpconnect
Comment 6•8 years ago
|
||
These are presumably on WebIDL bindings now so they probably behave the way they are supposed to.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•