On Sat, Apr 9, 2011 at 10:17 PM, Cedric Vivier <email@example.com>
Nice, this makes even more sense to describe it here indeed.
We should take this opportunity to define all WebGL events as simple
events as well.
That's how the newer specs handle these events: they're described as steps in the algorithms they're generated by, instead of described on their own.Â IMO, this makes things much clearer.
> The "clear the primary context" part in step 2 shouldn't be necessary; theI think it is indeed unnecessary and already specified at .
> getContext algorithm in the HTML should specify this.
WebGL's getContext behavior described above would be the step 6 of
canvas's getContext , therefore according to step 3 of  it is
not possible to get to WebGL's getContext when there is already a
The problem is when null is returned--it should be possible to try again.Â Currently per spec, if getContext returns null once, step 5 will always return null.
FYI, I still think getContext should throw an error if an error
happens.Â Using a message like this is unusual.Â There's no provision in the
HTML getContext spec for this, though.Â I'll go ask on whatwg.
However this might make sense to require for null rather than an
exception with any context when an error occurred at creation.
Sorry, I don't understand.