W3C home > Mailing lists > Public > public-webapi@w3.org > April 2006

Re: Some XHR comments

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 05 Apr 2006 17:46:20 +0200
To: "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: "Web APIs WG (public)" <public-webapi@w3.org>
Message-ID: <op.s7jkrirn64w2qv@id-c0020.oslo.opera.com>

On Wed, 05 Apr 2006 17:33:42 +0200, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> Anne van Kesteren wrote:
>>> An EventListener has the advantage of being an existing interface, but
>>> somehow it seems weird to use it if XHR isn't an EventTarget.
>>  I agree. I actually want XHR to be an EventTarget as well because it  
>> makes sense, but the only problem is that there's no implementation for  
>> that...
> It's an EventTarget in Gecko.

Could you please point out the bug in my testcase:


... I actually thought there was no implementation where this was this  
case. (I'm testing in Firefox 1.5.x though, which may be a/the problem.)

>>> There's also the issue of what you pass as the Event object to  
>>> handleEvent.
>>> I notice that Mozilla recently made a decision wrt this
>>> (https://bugzilla.mozilla.org/show_bug.cgi?id=198595).
>>  Yeah, there should be an open issue on that. I'd like `this` to return  
>> the XMLHttpRequest object. Opera does that. Internet Explorer and  
>> Safari return the Window object. Mozilla returns the Function object  
>> you passed to onreadystatechange...
> Note that the behavior of |this| in this function is somewhat  
> independent of whether we're looking at an EventListener.


> Also note that https://bugzilla.mozilla.org/show_bug.cgi?id=198595 in  
> fact changes the |this| in Gecko to be the XMLHttpRequest object.


Anne van Kesteren
Received on Wednesday, 5 April 2006 15:46:30 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:20 UTC