DiagnosticsViewport object
Provides an object for methods and properties associated with the viewport.
Note These APIs can only be used with F12 developer tools and the Diagnostics Script Engine, and can't be called from JavaScript.
Syntax
var oViewport = DiagnosticsEmulation.viewport;
DOM Information
Inheritance Hierarchy
The DiagnosticsViewport does not inherit from any class or interface.
Members
The DiagnosticsViewport object has these types of members:
- Methods
- Properties
Methods
The DiagnosticsViewport object has these methods.
Method | Description |
---|---|
restoreOriginalSettings | Resets the viewport to cached dimensions and orientation. |
setDimensions | Gets or sets the viewport's dimensions in pixels. |
Properties
The DiagnosticsViewport object has these properties.
Property | Access type | Description |
---|---|---|
Read/write |
Sets or gets height of viewport in pixels. |
|
Read/write |
Gets or sets whether viewport is portrait or landscape mode. |
|
Read/write |
Sets or gets width of viewport in pixels. |