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
@@ -1856,6 +1858,21 @@ The <dfn attribute for=VisualViewport>scale</dfn> attribute must run these steps
1856
1858
1. If there is no output device, return 1 and abort these steps.
1857
1859
1. Otherwise, return the <a>visual viewport</a>'s <a>scale factor</a>.
1858
1860
1861
+
The <dfn attribute for=VisualViewport>segments</dfn> is an array of DOMRects that represent the dimensions of each existing viewport segment.
1862
+
1863
+
A viewport segment represents the region of the visual viewport that resides on a separate display or logical display region.
1864
+
When the visual viewport spans across some number of physical features of a device, these features in turn convey a logical separation of the space available for content.
1865
+
1866
+
The segments attribute must run these steps:
1867
+
1. If the <a>visual viewport</a>'s <a for=visualviewport>associated document</a> is not <a>fully active</a>, return 0.
1868
+
2. Returns null if called from within an iframe context and abort these steps.
1869
+
3. Returns null if there is only a single viewport segment and abort these steps.
1870
+
4. Otherwise, return the <a>visual viewport</a>'s segments array.
1871
+
1872
+
Note: Based on the data returned for each viewport segment, developers will be able to infer the number of hinges available as well as the hinge orientation.
1873
+
The browser window can be moved/resized such that the number of segments and/or their dimensions change.
1874
+
In these cases, resize events will fire at which point authors should re-query this property, as the returned FrozenArray is just a snapshot of the current state.
1875
+
1859
1876
<dfn attribute for=VisualViewport>onresize</dfn> is the <a>event handler IDL attribute</a> for the <a event>resize</a> event.
1860
1877
1861
1878
<dfn attribute for=VisualViewport>onscroll</dfn> is the <a>event handler IDL attribute</a> for the <a event>scroll</a> event.
0 commit comments