W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2012

Re: [whatwg] [canvas] Proposal for supportsContext

From: Glenn Maynard <glenn@zewt.org>
Date: Tue, 11 Sep 2012 09:35:06 -0500
Message-ID: <CABirCh9B09=iDp-oVVwjtkFOCAs3i5eWGytqUrFCCfxnUKnYjg@mail.gmail.com>
To: Tobie Langel <tobie.langel@gmail.com>
Cc: "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>, Dean Jackson <dino@apple.com>, Ashley Gullen <ashley@scirra.com>, Simon Pieters <simonp@opera.com>
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:45 UTC