W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2009

[whatwg] Callback driven initialization of canvas

From: Charles Pritchard <chuck@jumis.com>
Date: Thu, 30 Apr 2009 17:13:54 -0700 (PDT)
Message-ID: <54203.67.171.33.219.1241136834.squirrel@mx.visc.us>
On Tue, 21 Oct 2008, Fabien Meghazi wrote:
>
> Undoubtedly, in the future, canvas will be used for good stuff but also
> for nasty stuff. Of course, how we consider nasty stuff is a personal
> feeling. I don't like ads. Especially flash ads. This is why I use
> Firefox extension flash block (amongs other reasons) I'm sure in the
> future we will see canvas ads poping everywhere, and here's my concern :
>
> Will it be possible for the browsers to allow an extension such as
> canvas block ?

Adding onto this thought, and this is more an implementors e-mail than one
for the specs,
we borrowed the onreadystatechange / readyState concept for one of our
stranger implementations.

Because, unfortunately, the implementation became synchronous, while the
calls
to the implementation were asynchronous, we found ourselves using readyState.
Value 0, canvas not initialized.
Value 1, initialized
Value 2, currently rendering and/or loading resources
Value 3, ready and waiting

This scheme was also somewhat useful when re-drawing a complex canvas.

-Charles
Received on Thursday, 30 April 2009 17:13:54 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:11 UTC