Re: [ambient-light] Request for Ambient Light Sensor web developer feedback (#64)

> As we know, the way that existing sensors like the gyroscope are currently accessed is generally to bind to the `devicemotion` / `deviceorientation` event on window. In Safari you'd call `DeviceMotionEvent.requestPermission()` before receiving this information, and the information is further gated by permissions policy (or feature policy ).
> [...]
> * speculatively in WebKit browsers, calling `DeviceLightEvent.requestPermission()` if required.
> [...]
> To summarise, I do not believe there is much risk of harm in introducing ALS as it is today, or even under the `devicelight` event.

Just a few clarifications that don't disprove @willmorgan's points:

* There's a [Gyroscope spec](https://w3c.github.io/gyroscope) that is built upon the Generic Sensors framework. Chromium-based browsers expose it by default. In Chromium-based browsers, the `devicemotion` and `deviceorientation` events (which come from the [DeviceOrientation Event spec](https://w3c.github.io/deviceorientation/)) happen to have their internals implemented using the same code used to implement the Generic Sensors-based APIs, but the spec predates the Generic Sensors ones and they are not related.
* `DeviceMotionEvent.requestPermission()` exists in WebKit, but not in Blink.
* `DeviceLightEvent` and the `devicelight` event have not existed since 2016 (and they're not shipped by any web engine at this point). They were part of a [former incarnation](https://www.w3.org/TR/2015/WD-ambient-light-20150903/) of the Ambient Light Sensor spec, when it was not based on the Generic Sensors framework.

-- 
GitHub Notification of comment by rakuco
Please view or discuss this issue at https://github.com/w3c/ambient-light/issues/64#issuecomment-929207472 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 28 September 2021 13:25:02 UTC