Screen orientation lock
Limited availability
The screen.orientation.lock()
method prevents changes to the screen orientation, typically in fullscreen applications such as games. For example, while locked, rotating a phone to the side won't change the screen orientation from landscape to portrait.
To learn more, see
ScreenOrientation: lock() method,
ScreenOrientation: unlock() method at MDN.
Compatibility
- Chrome ❌ Search for bugs Search for Chromestatus entry
- Chrome Android 38 Released on 2014-10-08
- Edge ❌ Search for bugs Search for Chromestatus entry
- Firefox ❌ Search for bugs Search for standards position
- Firefox for Android ❌ Search for bugs Search for standards position
- Safari ❌ Search for bugs Search for standards position
- Safari on iOS ❌ Search for bugs Search for standards position