W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: Is BlobBuilder needed?

From: Ojan Vafai <ojan@chromium.org>
Date: Tue, 25 Oct 2011 12:53:12 -0700
Message-ID: <CANMdWTt8fo9ORdsXCFhG=gyORVZOf3it7Yp-SjKVn6kqNgE6mw@mail.gmail.com>
To: Michael Nordman <michaeln@google.com>
Cc: Jonas Sicking <jonas@sicking.cc>, Erik Arvidsson <arv@chromium.org>, "Tab Atkins Jr." <jackalmage@gmail.com>, Eric U <ericu@google.com>, Webapps WG <public-webapps@w3.org>
The new API is smaller and simpler. Less to implement and less for web
developers to understand. If it can meet all our use-cases without
significant performance problems, then it's a win and we should do it.

For line-endings, you could have the Blob constructor also take an optional
endings argument:
new Blob(String|Array|Blob|ArrayBuffer data, [optional] String contentType,
[optional] String endings);

On Tue, Oct 25, 2011 at 11:57 AM, Michael Nordman <michaeln@google.com>wrote:

> This ultimately amounts to syntactic sugar compared to the existing api.
> It's tasty, but adds no new functionality. Also there's still the issue of
> how this new api would provide the existing functionality around line
> endings, so less functionality at the moment. I'm not opposed to
> additions/enhancements,  just want to put it in perspective and to question
> whether the api churn is worth it.
> On Mon, Oct 24, 2011 at 10:19 PM, Erik Arvidsson <arv@chromium.org> wrote:
>> On Mon, Oct 24, 2011 at 19:54, Jonas Sicking <jonas@sicking.cc> wrote:
>> > Sure. Though you could also just do
>> >
>> > var b = new Blob();
>> > b = new Blob([b, data]);
>> > b = new Blob([b, moreData]);
>> That works for me.
I'm happy with this. In theory, vendors could implement this using
copy-on-write or something similar so that this pattern is roughly as
efficient as BlobBuilder, right?
Received on Tuesday, 25 October 2011 19:54:03 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:36 UTC