Re: [wake-lock] In obtain permission: don't co-opt resultPromise - it's creating a custom permission model (#198)

> ... @reillyeon, just so I understand.. why would it not be possible to do this in a worker when `.request()`ing a lock?

A worker never has a user activation (until someone specifies how it might get one) and so an API to request permission for a capability (without actually using the capability) is needed.

That said, at the moment the current plans for this feature in Chrome don't include any UI that would be displayed when a call to `requestPermission()` is made. By that measure we should remove it until there is a wake lock type for which an up-front permission model makes sense. On the other hand we should encourage sites to call it anyways in case the permission model is changed.

What do you think?

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

Received on Tuesday, 8 October 2019 18:22:01 UTC