Closed Bug 295581 Opened 19 years ago Closed 19 years ago

nsSVGDocument doesn't implement nsIDOM3Document

Categories

(Core :: SVG, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 226193

People

(Reporter: me, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050523 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050523 Firefox/1.0+

I use to "find" implemented functions of DOM objects by using
the following code. This works perfectly for (X)HTML documents
in FF:

<svg ... onload="init(evt)">
<script>
function init(my_evt) {
    var func = "";
    for (i in my_evt) {
        func += my_evt[i] + "\n";
    }
    alert(func);
}
</script>
...
</svg>

For the SVG document above the following exception is fired:

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:///H:/projects/mmt2/SVG/animation.svg :: init :: line 18"  data: no]

Reproducible: Always
Ohh... btw... this was DeerPark Alpha 1 =)
Can you add a minimal testcase? If you need more than 1 file, attach the
referred files first, get the URL from the Attachment box and insert this where
it is needed.

Create a New Attachment:
https://bugzilla.mozilla.org/attachment.cgi?bugid=295581&action=enter
The for-in statement is core JavaScript, not SVG, and it's implemented fine. If
you change your loop to:

    for (i in my_evt) {
      if (i != 'domConfig')
        func += my_evt[i] + "\n";
    }

it should manage to enumerate the document's properties for you without any
further errors. The problem you've encountered is that nsSVGDocument doesn't
implement the interface nsIDOM3Document. Changing the summary to say so and
confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: for (i in object) not implemented → nsSVGDocument doesn't implement nsIDOM3Document
not an svg-speficic issue, even.

*** This bug has been marked as a duplicate of 226193 ***
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: