W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2010

[whatwg] HTMLCanvasElement.toFile()

From: João Eiras <joaoe@opera.com>
Date: Thu, 07 Jan 2010 23:27:14 +0100
Message-ID: <op.u56onosm2q99of@coruscant>

>> This function takes the same arguments as toDataURL(), plus an
>> additional 'name' argument. It produces the same result as
>> toDataURL(), except that it returns the result as a File object rather
>> than as a data-url encoded string. This can then be directly sent
>> using XMLHttpRequest.
> I think it would make more sense to have an actual type for binary data  
> (for example along the lines of my proposal on public-script-coord and  
> es-discuss) and enable getting one from <canvas> and sending via XHR.

How about just overloading xhr.send() to handle a <canvas> element ?
Received on Thursday, 7 January 2010 14:27:14 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:20 UTC