ScreenOrientation: unlock() method
The unlock()
method of the
ScreenOrientation
interface unlocks the orientation of the containing
document from its default orientation.
Syntax
js
unlock()
Parameters
None.
Return value
None (undefined
).
Exceptions
The promise may be rejected with the following exceptions:
InvalidStateError
DOMException
-
Thrown if the document is not fully active.
SecurityError
DOMException
-
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-lock
of thesandbox
attribute of theiframe
element). AbortError
DOMException
-
Thrown if there is any other
lock()
method invoking.
Specifications
Specification |
---|
Screen Orientation # dom-screenorientation-unlock |
Browser compatibility
BCD tables only load in the browser