W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2014

Re: [whatwg] Feature-detectable WakeLocks

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 18 Aug 2014 18:10:50 -0700
Message-ID: <CA+c2ei8BTePEQJjhiw+z46gQBQsHEa18mYJ7yYqF7dGtWsd8SA@mail.gmail.com>
To: Marcos Caceres <w3c@marcosc.com>
Cc: WHAT Working Group <whatwg@lists.whatwg.org>
On Mon, Aug 18, 2014 at 5:37 PM, Marcos Caceres <w3c@marcosc.com> wrote:
> On Monday, August 18, 2014 at 6:41 PM, Kornel LesiƄski wrote:
>> WakeLock.request() expecting a string isn't very friendly to feature detection.
>
> The API tells you if a wake lock type is not supported by either rejecting with a TypeError or by a DOMException whose name is NotSupportedError.

We've made this mistake before. See

http://robert.ocallahan.org/2012/05/canvas-getcontext-mistake.html

/ Jonas
Received on Tuesday, 19 August 2014 01:11:44 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:22 UTC