Re: [whatwg] A question about the drawimage() canvas function

On Sun, Mar 24, 2013 at 1:56 AM, Robert O'Callahan <robert@ocallahan.org>wrote:

> On Sat, Mar 23, 2013 at 3:08 PM, Rik Cabanier <cabanier@gmail.com> wrote:
>
>> In light of this, I think we should proceed with changing the W3C canvas
>> spec (and the implementations) so drawImage doesn't throw anymore on zero
>> sized image sources.
>> Being more forgiving could potentially cause other problems but it's not
>> very likely.
>>
>
> Are you agreeing with my proposal that drawImage should never throw at all?


I didn't know that that was your proposal. This thread was just for ero
sized images.
We have interop on exceptions when the image is not in the ready state [1]
so we shouldn't change that (even though I agree there shouldn't have been
an exception in the first place)
For exception-free drawimage calls, people can use the ImageBitmap class.

1:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#check-the-usability-of-the-image-argument

Received on Sunday, 24 March 2013 15:30:13 UTC