W3C home > Mailing lists > Public > public-device-apis-log@w3.org > May 2019

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

From: Raphael Kubo da Costa via GitHub <sysbot+gh@w3.org>
Date: Fri, 03 May 2019 15:08:23 +0000
To: public-device-apis-log@w3.org
Message-ID: <issues.opened-440089914-1556896102-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Monday, 4 July 2022 12:47:56 UTC