Viewport Class
The viewport of a window (https://drafts.csswg.org/css-viewport/#viewport-interface): its segments, the regions of a viewport split by the display features of a foldable or dual-screen device (BrowsingContextOptions.ViewportSegments). Without display features, the viewport has a single segment.
public sealed class ViewportProperties
| Name | Description |
|---|---|
| Segments | Gets the segments of the viewport (https://drafts.csswg.org/css-viewport/#dom-viewport-segments): null when the document is not fully active, else "if there is only a single viewport segment (typically the size of the Viewport) return an array with that single segment": the rectangle of the viewport (its origin, the size of Window.InnerWidth and Window.InnerHeight), or the segments split by the display features of ViewportSegmentsOptions.Provider, in row-major order. The documents of the nested browsing contexts get null (as in Chromium). |
Segments
Viewport.csGets the segments of the viewport (https://drafts.csswg.org/css-viewport/#dom-viewport-segments): null when the document is not fully active, else "if there is only a single viewport segment (typically the size of the Viewport) return an array with that single segment": the rectangle of the viewport (its origin, the size of Window.InnerWidth and Window.InnerHeight), or the segments split by the display features of ViewportSegmentsOptions.Provider, in row-major order. The documents of the nested browsing contexts get null (as in Chromium).
public IReadOnlyList<DomRect>? Segments { get; }