[whatwg] "canvas" tag and animations ?

Vladimir Vukicevic vladimirv at gmail.com
Mon Jun 20 01:51:25 PDT 2005

On 6/15/05, Charles Iliya Krempeaux <supercanadian at gmail.com> wrote:
> So then what do you do if your code is not amenable to the "event"
> drive way of programming.
> What if you have an "event loop" approach.  How then do you signify
> the "ending" so that things can actually happen?

I'm confused -- if you're operating within the context of a UA that
implements <canvas>, then you can't have your own event loop, but
instead have to operate based on event callbacks to your own code (be
they timeouts or whatever) that all happen on the UI thread.  I'm not
sure what other context you'd be able to use <canvas> in?

In any case, if for some reason a user needs more specific control
over double buffering, or wants to build up long frames over time or
whatever, they can render to a separate offscreen canvas, and then use
drawImage() to present that canvas to the user.

    - Vlad

More information about the whatwg mailing list