-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Top-level browsing context restrictions. #175
Comments
Also, it's unclear how this restriction works. https://w3c.github.io/sensors/#construct-sensor-object prevents construction of a sensor object by non-top-level contexts, but once you have the object, are you prevented from accessing sensor data if you move to the background? |
This is sort of addressed, albeit poorly here. Needs to be cleaned-up and clarified as part of the processing model which I still need to write. |
Looking at this a bit more closely, I think I initially mixed-up "top-level browsing context" with "visibility state". I think we want to distinguish the two. Restrict both for now, then lift restrictions around top-levle browsing context using FeaturePolicy and page visibility using more complex permission descriptors (with a |
Add visibility state requirement. Closes w3c#175.
Add visibility state requirement. Closes w3c#175.
Add visibility state requirement. Closes #175.
https://w3c.github.io/sensors/#browsing-context says:
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 whatwg/html#2391 points out some issues with the "has focus steps" algorithm, but that shouldn't be your problem to work out. :)
/cc @arturjanc
The text was updated successfully, but these errors were encountered: