Closed Bug 91 Opened 27 years ago Closed 25 years ago

document properties cannot be listed

Categories

(Core :: DOM: Core & HTML, defect, P3)

x86
Other
defect

Tracking

()

VERIFIED FIXED

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.
Assignee: nobody → mccabe
Component: JavaScript
Assignee: mccabe → mlm
Mass move of libmocha-related bugs to libmocha owner. Sorry, Mike.
Status: NEW → ASSIGNED
I will check this out soon.
Setting all current Open Critical and Major to M3
Assignee: mlm → clayton
Status: ASSIGNED → NEW
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?
Assignee: clayton → mlm
Component: JavaScript → LibMocha
Can you check this out to see if it's truly a libmocha problem? Thanks, Clayton
Assignee: mlm → clayton
Assignment to the owner of libmocha produces mlm@netscape.com. I'll try to get Dave Price to take ownership. = C =
Component: LibMocha → JavaScript
Product: MozillaClassic → Browser
QA Contact: 3819
Version: 1998-03-31 → other
moving over to Browser product from dead MozillaClassic product. Matt, is this still relevant even?
per leger, assigning QA contacts to all open bugs without QA contacts according to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser
DOM bugs are not my problem.
This was posted long enough ago to be a 4.5 problem in libmocha. Waiting for Dave Price to be available in Bugzilla. = C =
Assignee: clayton → mlm
Target Milestone: M3 → M7
Awaiting assignment to sustaining engineering.
QA Contact: 4015 → 4590
The "for in" statement is core JavaScript. Christine, can you look at this one?
QA Contact: 4590 → 4015
it's a sustaining eng dom thing. really, it's not mine.
Transfer to Marek for 4.x series.
QA Contact: 4015 → 4077
Component: JavaScript → DOM Level 0
Moving to DOM Level 0 comnponent. If this is a DOM Level 1 bug, please change component.
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]+"&nbsp;</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.
Assignee: marek → vidur
QA Contact: hannigan → gerardok
Status: NEW → ASSIGNED
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?
Target Milestone: M8
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.
QA Contact: gerardok → desale
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Checked in on 6/28/1999 as described above.
Status: RESOLVED → REOPENED
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]+"&nbsp;</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.
Assignee: vidur → rickg
Status: REOPENED → NEW
Target Milestone: M8 → M9
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.
Reopening bug for Rick. According to vidur this problem seems to be there because of string bug.
Resolution: FIXED → ---
Status: NEW → ASSIGNED
There is a string bug, and I'll update the tree after M9 opens.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
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.
Status: RESOLVED → VERIFIED
Working fine now. Verified.
Flags: in-testsuite-
You need to log in before you can comment on or make changes to this bug.