W3C home > Mailing lists > Public > public-device-apis@w3.org > January 2016

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

From: Tobie Langel via GitHub <sysbot+gh@w3.org>
Date: Thu, 21 Jan 2016 22:18:28 +0000
To: public-device-apis@w3.org
Message-ID: <issues.opened-128033757-1453414707-sysbot+gh@w3.org>
tobie has just created a new issue for https://github.com/w3c/sensors:

== Define behavior when visibilityState != "visible"  ==
1. 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?
2. What happens when the visibility state changes:
    1. from `"visible"` to something else? Emit an error event? Stop 
sending data?
    2. 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.

Please view or discuss this issue at 
https://github.com/w3c/sensors/issues/81 using your GitHub account
Received on Thursday, 21 January 2016 22:18:33 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:54:07 UTC