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

On February 3, 2016 at 1:13:34 AM, Anssi Kostiainen 
(notifications@github.com) wrote:
> >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.

I don't think you should hook into the event (those are for developers
 and not spec authors).  The visibility spec has the hooks to allow 
other specs to hook into its concepts without relying on the event - 
if it doesn't, then that is a bug in the visibility spec (I think I 
added those hooks last year, because Device Orientation needed them). 




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

Received on Wednesday, 3 February 2016 01:27:19 UTC