- From: Glenn Maynard <glenn@zewt.org>
- Date: Thu, 10 Feb 2011 20:23:18 -0500
- To: Ian Hickson <ian@hixie.ch>
- Cc: public-webapps@w3.org
Received on Friday, 11 February 2011 01:23:52 UTC
On Thu, Feb 10, 2011 at 6:27 PM, Ian Hickson <ian@hixie.ch> wrote: > * Is Blob.size supposed to be synchronous? I'm looking into adding a way > to get a Blob from <canvas>, but trying to avoid the mistake I made with > toDataURL of having the data be synchronously available. That's fine with > Blob and FileReader, the data can be read async, but the browser won't > know the size of the file ahead of time, which means that I guess I should > have a callback to get the Blob? It seems sad that we need to be async > both in getting the Blob _and_ in getting the data from the Blob. > You need to know the size of a Blob for the Blob's own synchronous API to work. In particular, Blob.slice needs to know the blob's size to clamp its parameters. -- Glenn Maynard
Received on Friday, 11 February 2011 01:23:52 UTC