Skip to content
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

Avaibality of the Visual Viewport API in non-secure contexts #57

Open
tpodder opened this issue Jul 26, 2018 · 4 comments
Open

Avaibality of the Visual Viewport API in non-secure contexts #57

tpodder opened this issue Jul 26, 2018 · 4 comments

Comments

@tpodder
Copy link

tpodder commented Jul 26, 2018

The spec does not mention if the Visual Viewport API is restricted to secure contexts only. Currently, in Chrome the Visual Viewport API is available in non-secure contexts. The W3C spec for secure contexts https://w3c.github.io/webappsec-secure-contexts/#new recommends all new features to be restricted to secure contexts. For existing features which are not widely used but widely implemented, the spec suggests applying this restriction and modifying the specs of the existing feature. What do you think about restricting the Visual Viewport API to secure contexts?

@bokand
Copy link
Collaborator

bokand commented Jul 30, 2018

The link you provide specifically mentions sensitive APIs which I would assume are those that can have privacy or other adverse consequences. I would assume VisualViewport is more akin to basic geometry information about the page (e.g. like window.innerWidth/Height) so I don't really see a reason it would need to be restricted - did this come up in a particular use case or example?

@theres-waldo
Copy link

I think we overlooked the fact that the linked policy only applies to sensitive APIs (which I agree Visual Viewport is not). I think part of the confusion is that for new APIs, we are trying to restrict everything (sensitive or not) to secure contexts.

@bokand
Copy link
Collaborator

bokand commented Aug 1, 2018

Yeah, that sounds fine to me. Unfortunately, we've been shipping it like this for a while so there's a non-trivial number of uses - I'll have to do some investigation to see if that's practical to do.

@karlcow
Copy link

karlcow commented Aug 22, 2018

s/Avaibality/Availability/ in title.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants