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

Re: [wake-lock] WakeLock.request() returns a promise that never resolves (#226)

From: Thomas Steiner via GitHub <sysbot+gh@w3.org>
Date: Thu, 08 Aug 2019 14:55:57 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-519554531-1565276156-sysbot+gh@w3.org>
Sounds great to me, I had a similar idea in mind where like with `window.setInterval` you’d get an ID back, but I thought it was too audacious to suggest attaching the request method “too high”. 

One could then listen for `window.onwakelockintervention`(reusing my made-up name) and be notified of UA interventions. 

The other point I raised was with the never-resolving promise. Can this be converted in a resolving promise when the lock is acquired successfully?

GitHub Notification of comment by tomayac
Please view or discuss this issue at https://github.com/w3c/wake-lock/issues/226#issuecomment-519554531 using your GitHub account
Received on Thursday, 8 August 2019 14:56:03 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 8 August 2019 14:56:04 UTC