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

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