w3c / sensors

Generic Sensor API
https://www.w3.org/TR/generic-sensor/
Other
127 stars 59 forks source link

Specify behavior when device sensor is no longer available #471

Open rakuco opened 11 months ago

rakuco commented 11 months ago

This originally came up in #470's review. It adds a note that says:

The behavior of platform sensors and Sensor instances when a device sensor in use stops being available (e.g. it has been physically disconnected, or stopped due to a factor unrelated to the User Agent) is not specified. Implementations may, among other things, keep existing Sensor instances unchanged (they simply will not report new readings), deactivate a sensor object or cause the platform sensor to report an error that will ultimately result in notify error being invoked.

We should probably specify the behavior here instead of leaving it implementation-defined.