Re: [whatwg] Challenging canvas.supportsContext

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