Re: [whatwg] Feature-detectable WakeLocks

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