On Tue, Jul 2, 2013 at 12:21 AM, Takeshi Yoshino <tyosh...@google.com> wrote: > What I have in my mind is like this: > > if (this.readyState == this.LOADING) { > stream = xhr.response; > // XHR has already written some data x0 to stream > stream.read().progress(progressHandler); > } > > ...loop... > > // XHR writes data x1 to stream > // XHR writes data x2 to stream > // XHR finishes writing to stream > > progressHandler continues receiving data till EOF. For this read() call > without maxSize, all of x0, x1 and x2 will be passed to progressHandler.
I see. I kinda thought that if you omitted size it would just give you everything in stream's buffer and not everything until end-of-stream. >> Do we even need that? It seems just passing ArrayBuffer in and out >> could be sufficient for now? > > As one of read()'s arguments? As for what it would return. Or do we have use cases where decoding to strings and/or Blobs are important? >> What's "pending read resolvers"? > > When any error occurs the stream needs to pending promises. So, I prepared > that list but I haven't written any text for error handling yet. Okay. -- http://annevankesteren.nl/