Closed
Bug 788966
Opened 12 years ago
Closed 12 years ago
Error when calling inherited XMLHttpRequest methods
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: philspam, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:13.0) Gecko/20120606 Firefox/13.0
Build ID: 20120606130836
Steps to reproduce:
Run the following Javascript code in Firefox 14+:
try{
var xhrConstructor = function() {};
xhrConstructor.prototype = new XMLHttpRequest();
var foo = new xhrConstructor();
foo.addEventListener('load', function() {}, false);
}catch(e){alert(e.toString())}
Actual results:
In Firefox 14+, an error is thrown when addEventListener is called:
[Exception... "Could not convert JavaScript argument" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: Scratchpad :: <TOP_LEVEL> :: line 5" data: no]
It isn't limited to addEventListener, all other methods inherited from XMLHttpRequest also fail.
Expected results:
The same behaviour as in Firefox < 14, the object should function as an XMLHttpRequest object, and no error should be thrown.
Updated•12 years ago
|
![]() |
||
Comment 1•12 years ago
|
||
Per WebIDL spec, this should throw.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
![]() |
||
Comment 2•12 years ago
|
||
And note that browser behavior here was inconsistent, so it's not like any actual web sites that want to work cross-browser were using this pattern...
Comment 3•12 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #1)
> Per WebIDL spec, this should throw.
Could you tell any more on this issue, please?
![]() |
||
Comment 4•12 years ago
|
||
I'm not sure what more there is to tell. See http://dev.w3.org/2006/webapi/WebIDL/#es-operations the description of the Function object step 2.
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•