Re: Multiple send() calls in XmlHttpRequest

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