w3c / sensors

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

Support non-"fully active" documents #415

Open anssiko opened 2 years ago

anssiko commented 2 years ago

We should check that the spec complies with https://w3ctag.github.io/design-principles/#support-non-fully-active

Given https://w3c.github.io/sensors/#can-expose-sensor-readings is conditional to https://html.spec.whatwg.org/multipage/interaction.html#currently-focused-area-of-a-top-level-browsing-context (among other checks) we may be good.

@marcoscaceres is probably interested in this design discussion.

rakuco commented 2 years ago

For the record: I've recently landed a patch in Chromium that makes Sensor.start() do nothing when the document is not fully active (strictly speaking, when there's no attached frame i.e. there's no browsing context). At least that part of the spec should be updated to take this into consideration at some point.