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

Re: BlobBuilder.append() should take ArrayBufferView in addition to ArrayBuffer

From: Glenn Maynard <glenn@zewt.org>
Date: Fri, 27 Apr 2012 08:33:28 -0500
Message-ID: <CABirCh_srD+VH4ggGHF-tUWbfUB-ALr75u4jt9MJ0_BTM06Y8g@mail.gmail.com>
To: Anne van Kesteren <annevk@opera.com>
Cc: David Herman <dherman@mozilla.com>, Arun Ranganathan <aranganathan@mozilla.com>, Eric U <ericu@google.com>, Boris Zbarsky <bzbarsky@mit.edu>, public-webapps@w3.org
On Fri, Apr 27, 2012 at 12:28 AM, Anne van Kesteren <annevk@opera.com>wrote:

> On Fri, 27 Apr 2012 00:13:42 +0200, Arun Ranganathan <
> aranganathan@mozilla.com> wrote:
>
>> The constructor will switch to use ArrayBufferView in lieu of
>> ArrayBuffer, but the read method exposed on FileReader and FileReaderSync
>> will read files into memory as ArrayBuffers.
>>
>
> Since the constructor is not widely deployed yet would it not be better to
> stick to ArrayBufferView exclusively, just like XMLHttpRequest.send()?


I think he's saying that the ctor (inputting data) will use ArrayBufferView
only, but FileReader (*outputting* data) returns an ArrayBuffer, like XHR's
arraybuffer response entity body.

I wish typed arrays could be fixed so ArrayBuffer is itself an
ArrayBufferView, to fix this inconsistency, but I think there are one or
two places in the API where it would break compat...

-- 
Glenn Maynard
Received on Friday, 27 April 2012 13:34:02 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:52 GMT