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

The Devices and Sensors Working Group just discussed `WakeLock.request() returns a promise that never resolves`.

<details><summary>The full IRC log of that discussion</summary>
&lt;xfq> Topic: WakeLock.request() returns a promise that never resolves<br>
&lt;xfq> github: https://github.com/w3c/wake-lock/issues/226<br>
&lt;anssik> https://github.com/w3c/wake-lock/issues/226<br>
&lt;anssik> scribeNick: anssik<br>
&lt;anssik> reillyg: #226 is a reaction to earlier API changes to remove WK instances and use single instance of a WakeLock object, minimal API that takes wake lock type and AbortSignal<br>
&lt;anssik> tom: awaiting a promise that never resolves is an uncommon design pattern<br>
&lt;anssik> reillyg: API was unintuitive, the issue #226 contains a number of examples of code developers would write and would expect to works based on other promise-using APIs<br>
&lt;anssik> tom: async/await pattern does not work too<br>
&lt;anssik> RRSAgent, draft minutes v2<br>
&lt;RRSAgent> I have made the request to generate https://www.w3.org/2019/09/20-dap-minutes.html anssik<br>
&lt;anssik> reillyg: the proposed fix was to build a mode intuitive API for developers and it fixes the ergonomics issues enumerated in #226<br>
&lt;anssik> ... had marcos in the room to speak how to use AbortController the right way<br>
&lt;anssik> ... AbortController was not the right tool for this task<br>
&lt;anssik> ... we'd instead use a pattern of an id, similarly to setInterval/setTimeout()<br>
&lt;anssik> tom: should rename "lockId "into "wakeLockID"<br>
&lt;anssik> reillyg: updated the proposal in #226<br>
&lt;anssik> kenneth: it's not constructible?<br>
&lt;anssik> reillyg: yes, since it's an attribute on navigator<br>
</details>


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

Received on Friday, 20 September 2019 00:47:16 UTC