You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is currently only supported by Edge (you can test it by checking for window.visualViewport.segments: if it is undefined then the feature is unsupported, if null then your screen is made up of only one display, if it's an array then you're on a foldable/multi-segment device (It can also be simulated in the developer tools).
While the Visual Viewport API is already tracker (see here, as well as several of its
VisualViewport
's properties (includingscale
,width
and others),segments
isn't.This property is defined by the standard: https://wicg.github.io/visual-viewport/#the-visualviewport-interface, and allows a script to query of how many and what type of segments (screen sections for foldables, screens for the Surface Duo) the display area is made of.
It is currently only supported by Edge (you can test it by checking for
window.visualViewport.segments
: if it isundefined
then the feature is unsupported, ifnull
then your screen is made up of only one display, if it's an array then you're on a foldable/multi-segment device (It can also be simulated in the developer tools).Here's some documentation on the feature:
The text was updated successfully, but these errors were encountered: