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

Re: [whatwg] Challenging canvas.supportsContext

From: Simon Pieters <simonp@opera.com>
Date: Wed, 26 Jun 2013 01:48:55 +0200
To: "Glenn Maynard" <glenn@zewt.org>
Message-ID: <op.wy9drtbaidj3kv@simons-macbook-pro.local>
Cc: Benoit Jacob <jacob.benoit.1@gmail.com>, WHATWG <whatwg@lists.whatwg.org>, Dean Jackson <dino@apple.com>
On Wed, 26 Jun 2013 01:39:01 +0200, Glenn Maynard <glenn@zewt.org> wrote:

> This is done if the feature is being disabled completely at page load  
> time,
> with no chance of it coming back: you simply don't put the interface into
> the environment.  WebGL is different, since it might go away after the  
> page
> is already loaded (eg. the GPU blacklist is updated); going in and trying
> to remove the interface after the page is loaded would be weird.  It  
> might
> also become available after previously being unavailable (eg. video  
> drivers
> are updated), in which case you'd have to go in and insert the interface.

That's a good point. But the above also means that supportsContext is not  
useful in such cases since the environment can have changed between the  
time supportsContext is called and the time you want to create a context.

> It also doesn't provide any way to query arguments to getContext, eg. to
> see if null would be returned if a particular option is provided, which
> supportsContext allows.  (I don't know if there are any cases where this
> actually happens, since most options are "best effort" and don't cause
> context creation to fail if they're not available.)

Right.

-- 
Simon Pieters
Opera Software
Received on Tuesday, 25 June 2013 23:47:14 UTC

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