Re: [sensors] Define behavior when visibilityState != "visible"

>My feeling is that we should simply not emit data when 
visibilityState isn't "visible" and resume emission when it switches 
back to visible.

This sounds like the right thing to do.

You can describe that in prose, or you can be more explicit and hook 
into the `visibilitychange` event as in 
https://www.w3.org/TR/vibration/. Some specs such as the Device 
Orientation API are silent about this, yet they are implemented (at 
least in Chromium) as such that when the page is in background 
emitting is suspended, and resumed when visible. No events such as 
`paused` or `resumed` are dispatched.

For a proper background story, we need to figure out how to expose the
 sensor APIs to `ServiceWorkerGlobalScope` but that is clearly a v2 
feature.

-- 
GitHub Notification of comment by anssiko
Please view or discuss this issue at 
https://github.com/w3c/sensors/issues/81#issuecomment-178592012 using 
your GitHub account

Received on Tuesday, 2 February 2016 14:13:36 UTC