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

Re: Multiple Open of the XMLHttpRequest object

From: Anne van Kesteren <annevk@opera.com>
Date: Sat, 28 Oct 2006 12:32:22 +0200
To: Denis Sureau <dgsureau@yahoo.com>
Cc: "Web APIs WG (public)" <public-webapi@w3.org>
Message-id: <op.th4nj82j64w2qv@id-c0020.oslo.opera.com>

On Sat, 28 Oct 2006 12:27:59 +0200, Denis Sureau <dgsureau@yahoo.com>  
wrote:
> In the working draft, the question was inquired:  What happens with
> multiple open calls?
> I am currently experiencing this aspect of the object, and it seems this
> can work only by using JavaScript closures.
>
> I wonder if the specification can state something to improve that.

It's an open issue. Once the issue is resolved, the specification will be  
more clear. The issue is things like this:

  client.open(...);
  client.send();
  client.open(...);

and also cases like:

  client.onreadystatechange = function() {
   if(this.readyState == 3) {
    this.open(...);
   }
  }

et cetera.


> Another problem is that the order of request processing is not garanted.
> Can we change that? With values of onReadyStateChange?

onreadystatechange takes an EventListener, not values. Besides that I've  
no idea what you mean. You can't have multiple requests at the same time  
with a single XMLHttpRequest object.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Saturday, 28 October 2006 10:33:09 GMT

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