w3c / webappsec-permissions-policy

A mechanism to selectively enable and disable browser features and APIs
https://w3c.github.io/webappsec-permissions-policy/
Other
396 stars 154 forks source link

Mark "ambient-light-sensor" as behind a flag in features.md #478

Closed o3-steven closed 2 weeks ago

o3-steven commented 2 years ago

Browser: Chrome Version 103.0.5060.114

Error: Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.

The above error is shown in the console while in the features document shows it being available in Chrome 66. Reading into the issue on Chromium I suspect that ambient-light-sensor might be covered by the 'accelerometer' permission-policy and there is an item open to decouple them Link

Either way on the feature documentation could we get that cleared up?

miketaylr commented 2 years ago

"ambient-light-sensor" is supported in Chromium (see https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5;l=60-64?q=ambient-light-sensor%20file:json&start=31) - but will depend on the #enable-generic-sensor-extra-classes flag being enabled in chrome://flags/.

See https://chromestatus.com/feature/5298357018820608.

o3-steven commented 2 years ago

Hey @miketaylr I guess my initial confusion is due to the fact that other features hidden behind flags are clearly marked in the documentation while this one is not. Would it be possible to update the documentation?

miketaylr commented 2 years ago

@o3-steven ah yeah - that sounds useful. :)

Would you like to send in a PR?