- From: Mike West via GitHub <sysbot+gh@w3.org>
- Date: Fri, 17 Mar 2017 13:47:07 +0000
- To: public-device-apis-log@w3.org
mikewest has just created a new issue for https://github.com/w3c/sensors: == Top-level browsing context restrictions. == https://w3c.github.io/sensors/#browsing-context says: > Sensor readings must only be available in the top-level browsing context to avoid the privacy risk of sharing the information defined in this specification (and specifications extending it) with contexts unfamiliar to the user. For example, a mobile device will only fire the event on the active tab, and not on the background tabs or within iframes. It sounds like you're trying to restrict the API to the document the user is actually interacting with. Unfortunately, there are lots of top-level browsing contexts (every tab is it's own "top-level"). I think you'll probably want to reference something like https://html.spec.whatwg.org/#has-focus-steps to ensure that you're talking about the right top-level browsing context. Perhaps something like "the [=active document=] of a [=top-level browsing context=] for which the [=has focus steps=] returns true."? Note that https://github.com/whatwg/html/issues/2391 points out some issues with the "has focus steps" algorithm, but that shouldn't be your problem to work out. :) /cc @arturjanc Please view or discuss this issue at https://github.com/w3c/sensors/issues/175 using your GitHub account
Received on Friday, 17 March 2017 13:47:13 UTC