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

Re: [XHR] can't get this.readyState to work

From: Dan Connolly <connolly@w3.org>
Date: Mon, 13 Aug 2007 23:32:35 -0500
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: public-webapi@w3.org
Message-Id: <1187065955.29837.86.camel@pav>

On Mon, 2007-08-13 at 22:01 -0500, Boris Zbarsky wrote:
> Dan Connolly wrote:
> > function handler() {
> >     alert("@@ handlder state, status:" + this.readyState + "/" +
> > this.status);
> > }
> > 
> > client.onreadystatechange = handler;
> > 
> > and I get undefined for this.readyState and this.status.
> > 
> > I'm using firefox 2.0.0.6 on ubuntu linux.
> 
> In Gecko 1.8 (Firefox 1.5 and Firefox 2), |this| is not bound to the 
> XMLHttpRequest object when the onreadystatechange function is called.
> 
> In Gecko 1.9 it will be bound to the XMLHttpRequest object.  Similarly, 
> event.target will be the XMLHttpRequest object in 1.9.
> 
> See https://bugzilla.mozilla.org/show_bug.cgi?id=198595 for details.

Oh my.

Thanks for the details.

> In other words, the example should work with, say, 
> http://www.mozilla.org/projects/firefox/3.0a7/releasenotes/#downloadandinstall
> 
> -Boris
-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Tuesday, 14 August 2007 04:32:50 GMT

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