Re: [whatwg] Canvas image to blob/dataurl within Worker

On Sat, Mar 21, 2015 at 4:19 AM, Jake Archibald <jaffathecake@gmail.com>
wrote:

> I'd rather we did that by introducing promises to HTMLCanvasElement.
> Returning a promise from toBlob is easy, making the callback arg optional
> by checking the type of the first arg is hacky but possible (and is done in
> js libs).
>
The spec (if there is one?) should be updated to return a promise and leave
out the callback:

promise canvas.toBlob(optional type, optional encoderOptions);

Mozilla would keep their existing implementation around and the IDL logic
would automatically pick the right call.


> On Sat, 21 Mar 2015 10:56 Robert O'Callahan <robert@ocallahan.org> wrote:
>
>> On Sat, Mar 21, 2015 at 5:45 PM, Rik Cabanier <cabanier@gmail.com> wrote:
>>
>>> Ah, OK. I thought we were changing it for both cases. This will cause a
>>> lot
>>> of confusion...
>>>
>>
>> If we want to keep HTMLCanvasElement and WorkerCanvas in sync, we can.
>>
>

Received on Saturday, 21 March 2015 17:54:49 UTC