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

Depends, sometimes it's critical to have sensor data being sent in the
 background - for example, if I'm driving based on that sensors 
information but I temporarily swapped apps.

Sent from my iPhone

> On 22 Jan 2016, at 9:18 AM, Tobie Langel <notifications@github.com> 
wrote:
> 
> What happens when a sensor is instantiated in a document whose 
visibilityState isn't "visible". Should we just throw a SecurityError 
like for secure context violations or should we do nothing but avoid 
sensing data until visibilityState goes back to "visible"? If the 
latter, should we have events to describe that?
> What happens when the visibility state changes:
> from "visible" to something else? Emit an error event? Stop sending 
data?
> from something else to "visible"? Do we start sending data?
> My feeling is that we should simply not emit data when 
visibilityState isn't "visible" and resume emission when it switches 
back to visible. Not sure whether we should emit events on the sensor 
object itself for this (like "paused" and "resumed" or something.
> 
> —
> Reply to this email directly or view it on GitHub.
> 


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

Received on Thursday, 21 January 2016 23:15:51 UTC