Closed Bug 310602 Opened 15 years ago Closed 14 years ago

access of type property of event object in onprogress handler yields error NS_ERROR_FAILURE 0x80004005

Categories

(Core :: XML, defect)

x86
Windows XP
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: martin.honnen, Assigned: bzbarsky)

References

()

Details

Someone has implemented an onprogress event handler for XMLHttpRequest object
but when script tries to use that to access evt.type as you could use with any
other event handler where the event object argument passed in has a type
property the following error occurs in the JavaScript console:

Error: [Exception... "Component returned failure code: 0x80004005
(NS_ERROR_FAILURE) [nsIDOMEvent.type]"  nsresult: "0x80004005
(NS_ERROR_FAILURE)"  location: "JS frame ::
http://home.arcor.de/martin.honnen/mozillaBugs/domLevel3/progressEventTypeProblem1.xhtml
:: anonymous :: line 37"  data: no]
Source File:
http://home.arcor.de/martin.honnen/mozillaBugs/domLevel3/progressEventTypeProblem1.xhtml
Line: 37

There is no specification as far as I know for XMLHttpRequest but if client-side
script can use that event handler I think the event object should have a type
property the script can access which gives a string with e.g. 'progress'.

I file this on the XML component in Core as so far the onprogress handler seems
to be specific to XMLHttpRequest. If it belongs in DOM Level 3 Load and Save
then please reassign.

Problem occurs with latest Firefox trunk nightly (Mozilla/5.0 (Windows; U;
Windows NT 5.1; en-US; rv:1.9a1) Gecko/20050930 Firefox/1.6a1) but also with 1.8
branch builds.
Summary: access of type property of event object in onprogress handler yields error NS_ERROR_FAILURE 0x80004005 → access of type property of event object in onprogress handler yields error NS_ERROR_FAILURE 0x80004005
The patch in bug 198595 fixes this.
Depends on: 198595
Assignee: xml → bzbarsky
Fixed by checkin for bug 198595
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.