Closed
Bug 91
Opened 27 years ago
Closed 25 years ago
document properties cannot be listed
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
VERIFIED
FIXED
M9
People
(Reporter: till, Assigned: rickg)
Details
Created by Till Krech (till@berlin.snafu.de) on Tuesday, April 7, 1998 9:05:23 AM PDT
Additional Details :
the JavaScript "for in" statement does not work on the
document object. At least not in the Linux version.
Updated•26 years ago
|
Assignee: nobody → mccabe
Component: JavaScript
Updated•26 years ago
|
Assignee: mccabe → mlm
Comment 1•26 years ago
|
||
Mass move of libmocha-related bugs to libmocha owner. Sorry, Mike.
Re-assigned to clayton@netscape.com.
Clayton, this was assinged to mlm. Since he's no longer with us, is this a bug
for you or Vidur's team?
Can you check this out to see if it's truly a libmocha problem?
Thanks, Clayton
Assignment to the owner of libmocha produces mlm@netscape.com.
I'll try to get Dave Price to take ownership.
= C =
Updated•26 years ago
|
Component: LibMocha → JavaScript
Product: MozillaClassic → Browser
QA Contact: 3819
Version: 1998-03-31 → other
Comment 7•26 years ago
|
||
moving over to Browser product from dead MozillaClassic product. Matt, is this
still relevant even?
Comment 8•26 years ago
|
||
per leger, assigning QA contacts to all open bugs without QA contacts according
to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser
Comment 10•26 years ago
|
||
This was posted long enough ago to be a 4.5 problem in libmocha. Waiting for
Dave Price to be available in Bugzilla.
= C =
Comment 11•26 years ago
|
||
Awaiting assignment to sustaining engineering.
Comment 12•26 years ago
|
||
The "for in" statement is core JavaScript. Christine, can you look at this one?
Comment 13•26 years ago
|
||
it's a sustaining eng dom thing. really, it's not mine.
Comment 14•26 years ago
|
||
Transfer to Marek for 4.x series.
Comment 15•26 years ago
|
||
Moving to DOM Level 0 comnponent. If this is a DOM Level 1 bug, please change
component.
Comment 16•26 years ago
|
||
Yes this problem seems to be there.
I created one testcase just now, and with this testcase browser should list all
properties and methods for document object. I'm using "for in" in this test case
and it seems its broken.
Product: Semonkey [Apprunner/Viewer]
Build: 1999-06-09-10
OS: I tested on Win95.
Steps To Reproduce:
1] Please copy HTML code I'm providing. Save it as HTML file.
2] Open this file in apprunner as well as viewer.
Expected Results:
It should print all the properties of document object with its current values.
Actual Results:
Does not do anything. [But works fine on Communicator 4.5]
CODE:
<html>
<head>
<title>
</title>
</head>
<script>
<!--
function getProperties(obj) {
var properties = "";
properties = '<HTML><BODY><TABLE BORDER="2" WIDTH="90%" COLS="2">';
properties += '<TR ALIGN="left"
BGCOLOR="lightgrey"><TH>Property</TH><TH>Value</TH></TR>';
for (var propName in obj) {
properties+="<TR><TD>"+propName+"</TD><TD>"+obj[propName]+" </TD></TR>";
}
properties +="</TABLE></BODY></HTML>";
return properties;
}
//-->
</script>
<body>
<Form name="propForm">
<script>
<!--
document.write(getProperties(window.document));
//-->
</script>
</form>
</body>
</html>
END OF CODE.
Updated•25 years ago
|
Status: NEW → ASSIGNED
Comment 17•25 years ago
|
||
The test script at the bottom seems to die quietly in the JS interpreter. We are
successfully executing the "for-in" loop, but I can't figure out where we're
dying.
Scott, could I get help figuring out where the problem is?
Updated•25 years ago
|
Target Milestone: M8
Comment 18•25 years ago
|
||
Scott helped me figure out that the problem was my own. A couple of the
native property getters are not quite implemented and return error codes (they
will be implemented post Necko). Since I still haven't implemented the mapping
between error codes and JS error/exception strings, the error is being dropped
on the floor.
I have a fix waiting in my tree that at least lets the enumeration succeed.
Waiting for M7 branching to occur before I check it in.
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 19•25 years ago
|
||
Checked in on 6/28/1999 as described above.
Updated•25 years ago
|
Status: RESOLVED → REOPENED
Comment 20•25 years ago
|
||
This problem still seems to be there. I tried it with 07-02-10 builds and this
time its printing only one propert and that is "title".
I tried modify this testcase. Initially the followig line in code [See function
getProperties(obj)] was getting wrapped.
properties += '<TRALIGN="left"
BGCOLOR="lightgrey"><TH>Property</TH><TH>Value</TH></TR>';
and still its getting wrapped. So when you copy this testcase, please undo that
wrapping so this testcase will show its effects. All I'm doing in this testcase
is, I'm trying to print all values of current properties of document object
using for in loop. I'm afraid that its still failing to do that.
Product: Semonkey [Apprunner/Viewer]
Build: 1999-07-02-10
OS: I tested on Win95.
Steps To Reproduce:
1] Please copy HTML code I'm providing. Save it as HTML file.
2] Open this file in apprunner as well as viewer.
Expected Results:
It should print all the properties of document object with its current values.
Actual Results:
Its printing only one property and that is "title".
CODE:
<html>
<head>
<title>Test Page
</title>
</head>
<script>
<!--
function getProperties(obj) {
var properties = "";
properties = '<HTML><BODY><TABLE BORDER="2" WIDTH="90%" COLS="2">';
properties += '<TR ALIGN="left"
BGCOLOR="lightgrey"><TH>Property</TH><TH>Value</TH></TR>';
for (var propName in obj) {
properties+="<TR><TD>"+propName+"</TD><TD>"+obj[propName]+" </TD></TR>";
}
properties +="</TABLE></BODY></HTML>";
return properties;
}
//-->
</script>
<body>
<Form name="propForm">
<script>
<!--
document.write(getProperties(window.document));
//-->
</script>
</form>
</body>
</html>
END OF CODE:
Please let me know If I'm wrong somewhere. I know some properties are not
working. For example "document.lastModified" does not work. There are some
others too. Is it because of that ?
Right now I'm reopening this bug. If you think, its problem related to those
properties which are not working then I'll submit seperate bugs for those and we
can close this bug.
Updated•25 years ago
|
Assignee: vidur → rickg
Status: REOPENED → NEW
Target Milestone: M8 → M9
Comment 21•25 years ago
|
||
This is an interesting one. The document property listing works correctly, but
the problem with the test occurs because of a string bug. The whitespace in the
title of the document is compressed using nsString::CompressWhitespace() in
nsHTMLContentSink::SetTitle(). Because of a bug in that routine, the whitespace
is compressed, but the length of the string is not changed. As a result, we have
a null in the middle of the title string and the rest of the test doesn't like
that.
Rick says that the bug is fixed in a new implementation of the string code that
will go in with M9. Forwarding the bug to him to close when the new string code
goes in.
Comment 22•25 years ago
|
||
Reopening bug for Rick. According to vidur this problem seems to be there
because of string bug.
Updated•25 years ago
|
Resolution: FIXED → ---
Assignee | ||
Comment 23•25 years ago
|
||
There is a string bug, and I'll update the tree after M9 opens.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 24•25 years ago
|
||
As far as I can tell, this page is working now. The title appears to be correct,
and the table appears to be correctly generated from JS.
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 25•25 years ago
|
||
Working fine now. Verified.
Updated•16 years ago
|
Flags: in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•