[whatwg] [canvas] Proposal for supportsContext
miket at opera.com
Mon Sep 10 14:40:40 PDT 2012
On Mon, 10 Sep 2012 13:14:30 -0500, Dean Jackson <dino at apple.com> wrote:
> To give a real world example, the popular tool Modernizr tests for the
> availability of WebGL by attempting to create a WebGL context. This can
> even on pages that have no intention of using WebGL - an author has just
> inserted Modernizr into their page and is using it to test for another
> As I said, creating a context is not a free operation. In fact, on
> Safari (Mountain Lion) this causes us to switch to a more powerful GPU
> on systems that have two graphics processors.
> An alternative (for the WebGL case) would be to have the author test for
> presence of window.WebGLRenderingContext. However, this is not reliable.
This is actually what Modernizr does these days , but older versions
did in fact create the context.
More information about the whatwg