Re: [whatwg] [canvas] Proposal for supportsContext

On Tue, Sep 11, 2012 at 3:50 AM, Tobie Langel <tobie.langel@gmail.com>wrote:

> I actually like Ashley Gullen's proposal (canPlayType-inspired)
> because it brings consistency to the platform and offers a general
> pattern on how to test for the presence of features which can't be
> asserted for certain without costly lookups.
>

This can't be asserted for certain, period, since whether you can create a
context can change.

It doesn't give consistency.  The convention on the platform is feature
testing: to find out whether something is available, try it and see if it
works.  This is closer to hasFeature, which is a pattern now avoided.

-- 
Glenn Maynard

Received on Tuesday, 11 September 2012 14:36:43 UTC