[w3c/permissions] Proposals: Drop "Powerful features registry" and PermissionName enum (Issue #314)

I'd like to propose we drop the `PermissionName` enum entirely and switch it to a `required DOMString` instead. 

The rationale for the change is that the Permission Spec is acting as a "gate-keeper" for other specs that may never get broadly supported. 

For example, Gecko only supports the following 4:
https://github.com/mozilla/gecko-dev/blob/43d18f9b44c9967029684aa66d0ad70dee3e89e5/dom/webidl/Permissions.webidl#L10-L16

WebKit has the following as a stub (doesn't actually reflect what is supported):
https://github.com/WebKit/WebKit/blob/cb1203bad562777ee3c25b4eb49ef16477385d1b/Source/WebCore/Modules/permissions/PermissionName.idl#L28-L43

What I propose we do instead is allow each spec to define its power-feature name (e.g., "geolocation"), which is then passed to the algorithms or API as appropriate. We are are already doing in practice.

This change would be backwards compatible, in that implementers could retain their current `PermissionName` enums for implementation purposes. For `.query()`, we would just make `PermissionDescriptor.name` behave like enum. 

It would also mean we no longer need to enum values "at risk" in our spec. 

Any objections?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/permissions/issues/314

Received on Thursday, 4 November 2021 05:17:52 UTC