[whatwg] Canvas size and double buffering.

Tim Hutt tdhutt at gmail.com
Wed Feb 3 10:01:46 PST 2010

On 3 February 2010 17:45, Boris Zbarsky <bzbarsky at mit.edu> wrote:
> On 2/3/10 12:22 PM, Tim Hutt wrote:
>> Yes it should be cleared and there should be a oncanvasresize() callback.
> What uses cases does this cover that are not covered by a general resize
> event?

Good point, it would be better to call it 'onresize' for consistency.
So my revised suggestion is:

1. Support more length specifiers for the width and height of a
canvas(%, em, etc.).
2. Add an onresize event to the canvas tag. When the canvas is resized
it is reset and this event is fired.
3. CSS size specifiers resize rather than scale the canvas. I.e. it
should always be that 1 unit = 1 pixel initially.

More information about the whatwg mailing list