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

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

From: Anne van Kesteren via GitHub <sysbot+gh@w3.org>
Date: Wed, 08 May 2019 11:32:58 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-490451205-1557340377-sysbot+gh@w3.org>
Given the redesign of feature policy that's ongoing, are they even the right fit here? This doesn't seem like something we'd ask the user so this would be a sandboxing thing, for which the design is still somewhat unclear: https://github.com/w3c/webappsec-feature-policy/issues/282#issuecomment-486267212 (and issues linked from there below).

Generally I try to avoid exposing exception order by using the same exception (`TypeError`), but that's not feasible here. We probably should have some principles in that case, but as @marcoscaceres said they don't exist yet.

Fetch does the aborting check early on (but after construction which can throw), but I suppose there I'd do a sandboxing check (when applicable) even earlier to avoid doing needless work.

What tradeoffs did you consider?

GitHub Notification of comment by annevk
Please view or discuss this issue at https://github.com/w3c/wake-lock/issues/202#issuecomment-490451205 using your GitHub account
Received on Wednesday, 8 May 2019 11:33:03 UTC

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