[whatwg] Callback driven initialization of canvas

Charles Pritchard chuck at jumis.com
Thu Apr 30 17:13:54 PDT 2009


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




More information about the whatwg mailing list