Screen Orientation
The unlock() method of the ScreenOrientation interface unlocks the orientation of the containing document, effectively locking it to the default screen orientation.
Syntax
unlock()
Parameters
None.
Return value
None (undefined).
Exceptions
InvalidStateErrorDOMException- : Thrown if the document is not fully active.
SecurityErrorDOMException- : Thrown if the document's visibility state is hidden or if the document is forbidden to use the feature (for example, by omitting the keyword
allow-orientation-lockof thesandboxattribute of theiframeelement).
- : Thrown if the document's visibility state is hidden or if the document is forbidden to use the feature (for example, by omitting the keyword
Specifications
Browser compatibility
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
