Since March 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
The type read-only property of the ScreenOrientation interface returns the document's current orientation type, one of portrait-primary, portrait-secondary, landscape-primary, or landscape-secondary.
A String.
| Specification |
|---|
| Screen Orientation> # dom-screenorientation-type> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
type |
38 | 79 | 43 | 25 | 16.4 | 38 | 43 | 25 | 16.4 | 3.0 | 38 | 16.4 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/type