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: Marcos Cáceres via GitHub <sysbot+gh@w3.org>
Date: Wed, 07 Aug 2019 17:53:51 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-519203412-1565200430-sysbot+gh@w3.org>
>  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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 August 2019 17:53:53 UTC