Closed Bug 48867 Opened 24 years ago Closed 20 years ago

Trying to iterate over properties in document object

Categories

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

x86
Windows 98
defect

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: aaronlev, Assigned: waterson)

Details

(Keywords: dom0)

Attachments

(3 files)

When I try to iterate of the document object, I get this error:

###!!! ASSERTION: write me: 'NotYetImplemented', file
c:\src\mozilla\rdf\content
\src\nsXULDocument.cpp, line 3757
###!!! Break: at file c:\src\mozilla\rdf\content\src\nsXULDocument.cpp,
line 3757

This is the code I used:
for (prop in document) {dump (prop +' ');}

It works when I iterate over window or another object.
Browser, not engine - changing component to DOM Level 0
Assignee: rogerl → jst
Component: Javascript Engine → DOM Level 0
QA Contact: pschwartau → desale
Which build ID was the reporter using? Please include this in 
any bug report; thanks -

I cannot reproduce this using Mozilla debug builds 2000-08-15 
on WinNT, Linux; or on Mac commercial build  2000081413.

I tried both the reporter's test case, and also this JavaScript URL:
javascript: var s=''; for(prop in document){s += prop + '  ';}; alert(s);

I did not get any errors or assertions. Marking WorksForMe -
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
This attachment shows the problem for Build 2000073008
RUN: mozilla.exe -chrome chrome://sherman/browser/content/sherman.xul
In the address bar, type obj document.
This runs BrowserLoadURL, which I have changed to run sherm_DOM_view_command()
Typing "obj javascript_obj_name" in the URL bar causes the package to 
introspect and list the properties on the text console. It works for everything 
except "obj document".
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
setting bug status to New
Status: UNCONFIRMED → NEW
Ever confirmed: true
This error comes from nsXULDocument::EnumerateProperty(), reassigning to hyatt
for investigation and prioritization.
Assignee: jst → hyatt
->waterson, per hyatt
Assignee: hyatt → waterson
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Keywords: dom0
not sure if related, but Mozilla will throw an exception when you try to access
an object property that is XUL only. Attached is the correct JavaScript routine
for object property hacking.
When I do alert(document.config), then I get the following exception in todays
builds.
[Exception... "Component returned failure code: 0x80004001
(NS_ERROR_NOT_IMPLEMENTED) [nsIDOM3Document.config]" nsresult: "0x80004001
(NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame ::
http://home.hccnet.nl/m.wargers/bookmarklets/elementprop.js :: showObject ::
line 23" data: no]

Using:
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6a) Gecko/20030929
Firebird/0.7+

So when I try to iterate over the objects/properties/methods in the document
object I must handle the exception, otherwise the script doesn't work. 
Is this still an issue?  The code jst mentions in comment 7 no longer exists,
comment 10 is covered by other bugs....
No response, unable to reproduce problem, so marking worksforme.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago20 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: