- From: Anne van Kesteren <annevk@annevk.nl>
- Date: Wed, 26 Jun 2013 13:38:13 +0100
- To: Takeshi Yoshino <tyoshino@google.com>
- Cc: Jonas Sicking <jonas@sicking.cc>, Feras Moussa <feras.moussa@hotmail.com>, Travis Leithead <travis.leithead@microsoft.com>, Alex Russell <slightlyoff@google.com>, "Web Applications Working Group WG (public-webapps@w3.org)" <public-webapps@w3.org>
On Wed, Jun 26, 2013 at 6:48 AM, Takeshi Yoshino <tyoshino@google.com> wrote: > I wrote a strawman spec for Stream.readAsArrayBuffer. Comment please. Calling the stream associated concepts the same as the variables in the algorithm is somewhat confusing (read_position vs read_position). > 4. If called with the optional size, set the read_position of stream to > read_position + size. > 5. Otherwise, neuter the stream. Why would it be neutered if size is not given? > 7. Read data from stream from read_position up to size bytes or all data is > size is not specified. > 8. As data from the stream becomes available, do the following, I think you need to define the stream buffer somewhat more explicitly so that only what you decide to read from the buffer ends up in the ArrayBuffer and newly queued data while that is happening is not. Probably defining Stream conceptually and defining read() (I don't think we should call it readAsArrayBuffer) in terms of those concepts is better. E.g. similar to how http://url.spec.whatwg.org/ has a model and an API part. -- http://annevankesteren.nl/
Received on Wednesday, 26 June 2013 12:38:40 UTC