[whatwg] "canvas" tag and animations ?

Sjoerd Visscher sjoerd at w3future.com
Mon Jun 13 02:06:39 PDT 2005

Charles Iliya Krempeaux wrote:
> IMO, it would be better to a have solution to this built into the API.
>  Maybe with some kind of "drawing transaction".
> (A "draw transaction" is a little higher level than "double
> buffering", and allows you use other systems for this, other than
> "double buffering".  And would probably be safer, considering much of
> JavaScript is done via events.)

This isn't needed. Just like in normal HTML a drawing transaction is 
automatically started when the javascript code starts, and finished when 
the javascript code is done. And this is how it is implemented in 
Firefox (don't know about Safari).

Maybe the spec should describe this somewhere? Not specifically for 
canvas, but for script in general: Changes on the DOM must be performed 
instantly, and values like offsetWidth etc. must be recalculated, but 
only visible when the script is done.

Sjoerd Visscher

More information about the whatwg mailing list