W3C home > Mailing lists > Public > public-webapi@w3.org > January 2007

Re: [XMLHttpRequest] Clearing the readystatechange listener

From: Anne van Kesteren <annevk@opera.com>
Date: Mon, 08 Jan 2007 22:25:41 +0100
To: "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: "Web API WG (public)" <public-webapi@w3.org>
Message-ID: <op.tluts3dj64w2qv@id-c0020>

On Sun, 19 Nov 2006 21:45:28 +0100, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> The draft does not indicate what happens to the readystatechange  
> listener when the request completes.  If another request is then  
> dispatched using the same XMLHttpRequest object, does the  
> readystatechange listener persist?
>
> Gecko's behavior right now is to clear all event listeners (including  
> readystatechange) when the request goes into readyState 4.  Not sure  
> what other UAs do.

All other user agents don't clear event listeners. See  
http://tc.labs.opera.com/apis/XMLHttpRequest/onreadystatechange/002.htm  
for a testcase. As such, I don't think the specification would need to  
state anything in addition as it already describes the behavior  
implementations should exhibit.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Monday, 8 January 2007 21:26:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:56 GMT