Re: Multiple Open of the XMLHttpRequest object

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 UTC