Re: [whatwg/webidl] IDL-level support for permission checks? (Issue #1066)

Ok, we had a look through the lists above and this seems potentially feasible. 

There are some cases we should discuss, in particular, a few APIs do "fully active" checks **before** "allowed to use" check (e.g., [Fullscreen API](https://fullscreen.spec.whatwg.org/#ref-for-allowed-to-use), and [WebShare](https://w3c.github.io/web-share/#share-method)). 

The other question is: what exception should be thrown? SecurityError seems pretty popular, but maybe that can be configurable? (tho that's it's a bit ugly). 

The last interesting one is for booleans operations... can it be safe to assume that "not allowed" would always return false... There is only the one case we have for Web Share. 

The other small thing we noticed is that some editors are confusing getting "permission to use X" (Permissions API) with Permissions Policy (i.e., "allowed to use")... this might help there too. 

 


-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/issues/1066#issuecomment-1023001982
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/issues/1066/1023001982@github.com>

Received on Thursday, 27 January 2022 09:18:29 UTC