ScreenOrientation.type

Baseline 2023

Newly available

Since March 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

ScreenOrientation の読み取り専用プロパティ type は、文書の現在の向きのタイプを返します。"portrait-primary""portrait-secondary""landscape-primary""landscape-secondary" のいずれかです。

String です。

仕様書

Specification
Screen Orientation
# dom-screenorientation-type

ブラウザーの互換性

BCD tables only load in the browser