MDN self-hosted library · e01.org

ScreenOrientation: unlock() method

Screen Orientation

no runnable cells web-api-instance-method upstream source

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

  • 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 the sandbox attribute of the iframe element).

Specifications

Browser compatibility