Table of Contents

Class Viewport

Namespace
WebDriverBiDi.BrowsingContext
Assembly
WebDriverBiDi.dll

Represents the dimensions of a viewport.

public class Viewport
Inheritance
Viewport
Inherited Members

Constructors

Viewport()

Initializes a new instance of the Viewport class.

[JsonConstructor]
public Viewport()

Properties

Height

Gets or sets the height of the viewport.

[JsonPropertyName("height")]
public ulong Height { get; set; }

Property Value

ulong

ResetToDefaultViewport

Gets a Viewport object that indicates the viewport should be reset to the default.

public static Viewport ResetToDefaultViewport { get; }

Property Value

Viewport

Remarks

The returned instance is a sentinel: it serializes as null to request the default viewport, so any value assigned to Height or Width on it is ignored rather than sent. To set an explicit size, construct a Viewport with the parameterless constructor instead.

Width

Gets or sets the width of the viewport.

[JsonPropertyName("width")]
public ulong Width { get; set; }

Property Value

ulong