lock

inline suspend fun ScreenOrientation.lock(orientation: OrientationLockType)(source)

The lock() method of the ScreenOrientation interface locks the orientation of the containing document to the specified orientation.

MDN Reference