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

>  It only rejects when the wake lock has been released. 

That seems wrong, fwiw - and @tomayac’s code seems to illustrates that. It’s not “exceptional” that the lock is released (something is not right) - though a user aborting the acquisition operation might be. The lock being acquired is a natural point at which to settle the promise. 

I’d suggest maybe looking at how the full screen API works. This is quite similar. 

-- 
GitHub Notification of comment by marcoscaceres
Please view or discuss this issue at https://github.com/w3c/wake-lock/issues/226#issuecomment-519203412 using your GitHub account

Received on Wednesday, 7 August 2019 17:53:52 UTC