Contact email
Spec
Spec.
Summary
Explicitly expose properties of the visual viewport (i.e. the viewport affected by pinch-zoom) through a `window.view` object.
Link to “Intent to Implement” blink-dev discussion
Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes
Demo link
Example from GitHub repo README. More examples in repo.
Interoperability and Compatibility Risk
This is a new feature and Chrome would be the first to ship so there is a small interop risk if other vendors fail to implement it. That said, the API has been endorsed by devs from Safari, Edge, and Firefox. Current versions of these browsers allow a polyfill to work but that could change if they implement the "inert visual viewport".
The API itself should have low compat risk as it's only adding a new feature. The inert flag does have non-trivial compat risk as it changes how various scroll APIs (window.scrollX, window.innerWidth, etc.) work. I believe this is mitigated since flipping it locks a page to the "fully zoomed out" state as far as the page can tell (for more detail, see John Mellor's message on the old intent to ship). Additionally, the inert flag shipped in M48, though we got some significant developer push-back, we didn't receive any reports from users of "broken pages". Another point is that Safari has agreed to this model as well. The current non-inert model has many broken edge-cases so the net effect will likely be positive for users.
For Viewport API:
Edge: Public support
Firefox: Public support
Safari: Public support
Web developers: Positive
Is this feature fully tested by web-platform-tests?
Yes: Link
OWP launch tracking bug
Entry on the feature dashboard
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/642045c2-534f-4118-accd-84396a509f5c%40chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFUtAY8i41CRPNGL3YpYjSytfGR0fbQmc0Z2pi3vmCXxXDR4gA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw_sJ32DjcsquamcivRsXS%2Bn_nYAMyOFptogtewg5NCutg%40mail.gmail.com.
LGTM3.-mike
LGTM2
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFUtAY8i41CRPNGL3YpYjSytfGR0fbQmc0Z2pi3vmCXxXDR4gA%40mail.gmail.com.
I expect this shouldn't be an issue in most cases as `window.view` can be shadowed so pages that set a global `view` name should continue to work. The only place this falls down is if they check the global `view` for existence prior to having set it and assume something about it like above.
It's only shadowed if you declare a global variable, which is generally regarded as bad practice and not done in modern JS development.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/7469a472-4821-4d27-ae4c-18054a6aed6f%40chromium.org.