Sdílet prostřednictvím


orientation property

Gets or sets whether viewport is portrait or landscape mode.

Note  These APIs can only be used with F12 developer tools and the Diagnostics Script Engine, and can't be called from JavaScript.

 

This property is read/write.

 

Syntax

JavaScript
object.orientation = sOrientationsOrientation = object.orientation

 

Property values

Type: DOMString

Set to either "landscape" or "portrait"

See also

DiagnosticsViewport