Open theres-waldo opened 6 years ago
That's correct. The reason it's defined in iframes is for correct composition. If you take a page that uses the visualViewport and embed it in an iframe it should still function. You can think of an iframe as having an immutable visualViewport since it (today) can't be pinch-zoomed independently of the main frame. However, all the properties and operations are still well-defined.
We're looking at implementing the Visual Viewport API in Firefox. One thing we noticed was that the spec seems to define
visualViewport
for iframes as well. Is that useful? My understanding is that iframes don't have distinct notions of visual and layout viewports, since they cannot be zoomed.