Closed
Bug 360654
Opened 19 years ago
Closed 19 years ago
document.[properties] is not handled properly
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 226193
People
(Reporter: EBourdier, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.0.8) Gecko/20061025 Firefox/1.5.0.8
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.0.8) Gecko/20061025 Firefox/1.5.0.8
if you try the following for a Window
// propertie for a window
function properties(){
var sProps = "Windows Propertie\n";
for (props in window)
sProps += props + ": " + window[props] + "\n";
alert (sProps);
}
This is behaving as expected
HOWEVER
Should you try
// propertie for a window
function propertiesD(){
var sProps = "document Propertie\n";
for (props in document)
sProps += props + ": " + document[props] + "\n";
alert (sProps);
}
you will get (in the JavaScript:)
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIDOM3Document.domConfig]" nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame :: file:///....../MYTOOL.html?VARIABLE=NAME1 :: properties :: line 93" data: no]
Reproducible: Always
Steps to Reproduce:
1. Create a HTML file wiht the following
<html>
<body>
<span id="OUTPUT">test</span>
<script language="JavaScript">
// propertie for a window
function properties(){
var sProps = "Document Propertie\n";
for (props in document)
sProps += "<font color='red'>" +props + "</font>: " + document[props] + "<br>";
document.getElementById('OUTPUT').innerHTML = (sProps)
}
properties()
</script>
</body>
</html>
2. Launch the page
3. type JavaScript: in the URL
NOTE : should you replace all instance of the word document by window the script is working fine.
This lead me to beleive the Script is correct
Actual Results:
The innerHTML is not displayed as it should
Expected Results:
A list of all the Document properties in the innerHTML
Comment 1•19 years ago
|
||
Looks like a DUPLICATE of bug 226193.
Comment 2•19 years ago
|
||
*** This bug has been marked as a duplicate of 226193 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•