W3C home > Mailing lists > Public > public-device-apis-log@w3.org > May 2019

Re: [wake-lock] Losing reference to a WakeLock object is a bug or intended behavior (#199)

From: Jake Archibald via GitHub <sysbot+gh@w3.org>
Date: Wed, 01 May 2019 07:16:04 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-488224898-1556694963-sysbot+gh@w3.org>
FWIW web locks has a query method: https://wicg.github.io/web-locks/#api-lock-manager-query, but it is purely informational. It doesn't give you the ability to cancel the locks.

It seems weird to me that `request` can be called multiple times on a single lock instance.

It feels like a lock only exists once its gained. And once a lock is released it no longer counts as a lock.

If the active state only ever changes from 'true' to 'false', consider replacing it with a promise that resolves once the lock is released.

-- 
GitHub Notification of comment by jakearchibald
Please view or discuss this issue at https://github.com/w3c/wake-lock/issues/199#issuecomment-488224898 using your GitHub account
Received on Wednesday, 1 May 2019 07:16:05 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 1 May 2019 07:16:05 UTC