W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2014

Re: Multiple send() calls in XmlHttpRequest

From: Anne van Kesteren <annevk@annevk.nl>
Date: Wed, 4 Jun 2014 15:16:44 +0200
Message-ID: <CADnb78ios+cZ6D9cZjY7CFpZyeG91yyzKZB-YLrruSBVhbQo3g@mail.gmail.com>
To: "piranna@gmail.com" <piranna@gmail.com>
Cc: "public-webapps@w3.org" <public-webapps@w3.org>, Luis López Fernández <lulop@kurento.com>
On Wed, Jun 4, 2014 at 3:05 PM, piranna@gmail.com <piranna@gmail.com> wrote:
>> The send() flag is only set as long as the fetch is ongoing. Once the
>> fetch has finished, it is no longer set. So this is already possible.
>
> I did some tests some months ago and I was not be able to achieve it,
> nor found any info or examples on Internet about if it's or it's not
> possible.

You need to invoke open() to set the object in the proper state.

<!DOCTYPE html>
<script>
var client = new XMLHttpRequest,
     i = 0
client.open("GET", "image");
client.send()
client.onload = function() { w(i); i++; client.open("GET", "image");
this.send()   }
</script>


-- 
http://annevankesteren.nl/
Received on Wednesday, 4 June 2014 13:17:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:24 UTC