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

Re: Is BlobBuilder needed?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 24 Oct 2011 16:46:19 -0700
Message-ID: <CAAWBYDD6NZ9=g_ae3s1vHH4qu17EdBZ7J6wWVoSNQ97wDEQGnw@mail.gmail.com>
To: Eric U <ericu@google.com>
Cc: Jonas Sicking <jonas@sicking.cc>, Webapps WG <public-webapps@w3.org>
On Mon, Oct 24, 2011 at 4:33 PM, Eric U <ericu@google.com> wrote:
> The only things that this lacks that BlobBuilder has are the endings
> parameter for '\n' conversion in text and the content type.  The
> varargs constructor makes it awkward to pass in flags of any
> sort...any thoughts on how to do that cleanly?

Easy.  The destructuring stuff proposed for ES lets you easily say things like:

function(blobparts..., keywordargs) {
  // blobparts is an array of all but the last arg
  // keywordargs is the last arg
}

or even:

function(blobparts..., {contenttype, lineendings}) {
  // blobparts is an array of all but the last arg
  // contenttype and lineendings are pulled from the
  // last arg, if it's an object with those properties
}

~TJ
Received on Monday, 24 October 2011 23:47:18 GMT

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