W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2013

Re: [whatwg] Challenging canvas.supportsContext

From: Brandon Benvie <bbenvie@mozilla.com>
Date: Wed, 19 Jun 2013 14:20:40 -0700
Message-ID: <51C220A8.9070907@mozilla.com>
To: James Robinson <jamesr@google.com>
Cc: whatwg <whatwg@lists.whatwg.org>
On 6/19/2013 2:05 PM, James Robinson wrote:
> What would a page using Modernizr (or other library) to feature detect 
> WebGL do if the supportsContext('webgl') call succeeds but the later 
> getContext('webgl') call fails?

I don't have an example, I was just explaining how Mozernizr is often used.

> I'm also failing to see the utility of the supportsContext() call. 
>  It's impossible for a browser to promise that 
> supportsContext('webgl') implies that getContext('webgl') will succeed 
> without doing all of the expensive work, so any correctly authored 
> page will have to handle a getContext('webgl') failure anyway.

Given this, it would seem supportsContext is completely useless. The 
whole purpose of a feature detection check is to detect if a feature 
actually works or not. Accuracy is more important than cost.
Received on Wednesday, 19 June 2013 21:21:05 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:22 UTC