Closed
Bug 548830
Opened 15 years ago
Closed 14 years ago
DOM standard, image with id "all" reports document.all as valid
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: octavio.rdz, Unassigned)
Details
(Whiteboard: [CLOSEME 2011-1-30])
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
If i have a image with id "all" then document.all is reported as a valid property, no such as a problem so far, except that this is not standard. But as you might know many javascript libraries use document.all to find out if it is IE browser so here is when the problem comes out causing the those libraries stop working properly.
And more over getting a image by document.image_id causes that every script that declares a image with the same name as a property report the image instead of the property.
Reproducible: Always
Steps to Reproduce:
1.Declare an image with id "all"
2.alert the value of document.all
This is a small page that show the problem
<html>
<head>
</head>
<body>
<img id="all"/>
<img id="x"/>
</body>
<script language="javascript" type="text/javascript">
document.x = 10; //Not sure how many ppl use this but anyway is a potencial problem
alert(document.all);
alert(document.x);
</script>
</html>
Actual Results:
The alert show HTMLImageElement
Expected Results:
The alert should display "undefined"
I am using firebug 1.5.2 just in case that takes part.
Comment 1•14 years ago
|
||
Reporter, are you still seeing this issue with Firefox 3.6.13 or later in safe mode? If not, please close. These links can help you in your testing.
http://support.mozilla.com/kb/Safe+Mode
http://support.mozilla.com/kb/Managing+profiles
You can also try to reproduce in Firefox 4 Beta 8 or later, there are many improvements in the new version, http://www.mozilla.com/en-US/firefox/all-beta.html
Whiteboard: [CLOSEME 2011-1-30]
| Reporter | ||
Comment 2•14 years ago
|
||
Ok, this is what I found out it depends on the document type definition which is correct.
If the document definition is quirk or not defined then the "problem" is presented. This used to not happen before even in quirk mode, but I am closing the bug cause in strict or standard is not happening this behavior is acceptable.
I have tried Firefox 3.6.13 and Firefox 4 Beta 8, and the behavior is the same as described above.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•