[whatwg] [canvas] Proposal for supportsContext
Glenn Maynard
glenn at zewt.org
Tue Sep 11 07:35:06 PDT 2012
On Tue, Sep 11, 2012 at 3:50 AM, Tobie Langel <tobie.langel at 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
More information about the whatwg
mailing list