[wake-lock] request(): Order for permission and other checks (#202)

rakuco has just created a new issue for https://github.com/w3c/wake-lock:

== request(): Order for permission and other checks ==
I was talking to @kenchris about this earlier today. Is there any guidance somewhere covering the order we should be performing the checks we do in `request()` (e.g. for a browser context, whether we have a "screen" lock type and the page is not visible, feature-policy checks, `AbortController` handling)?

An example where this actually impacts users is handling `AbortController` before or after the feature-policy check: if we call `WakeLock.request(...)` with a signal that's been aborted and the page's feature policy denies use of wake locks, should `request()` reject with `NotAllowedError` or `AbortError`?

Please view or discuss this issue at https://github.com/w3c/wake-lock/issues/202 using your GitHub account

Received on Friday, 3 May 2019 15:08:25 UTC