• Skip to main content
  • Skip to search
  • Skip to select language
MDN Logo
    • Technologies Overview
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs
    • Browser Extensions
    • MathML
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
    • Send Feedback
    • Contribute to MDN
    • Report a content issue 🌐
    • Report a platform issue 🌐
  1. Web technology for developers
  2. Web APIs
  3. ScreenOrientation
  4. ScreenOrientation.unlock()

Table of contents

  • Syntax
  • Specifications
  • Browser compatibility

ScreenOrientation.unlock()

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The unlock() property of the ScreenOrientation interface unlocks the orientation of the containing document from its default orientation.

Syntax

screen.orientation.unlock()

Parameters

None.

Return value

Void.

Specifications

Specification
The Screen Orientation API
# dom-screenorientation-unlock

Browser compatibility

Found a problem with this page?

  • Edit on GitHub
  • Source on GitHub
  • Report a problem with this content on GitHub
  • Want to fix the problem yourself? See our Contribution guide.

Last modified: Sep 14, 2021, by MDN contributors

Related Topics

  1. ScreenOrientation
  2. Properties
    1. angle
    2. lock()
    3. type
    4. unlock()
  3. Inheritance:
    1. EventTarget
MDN Logo
  • Web Technologies
  • Learn Web Development
  • About MDN
  • Feedback
  • About
  • MDN Web Docs Store
  • Contact Us
  • Firefox

MDN

  • MDN on Twitter
  • MDN on Github

Mozilla

  • Mozilla on Twitter
  • Mozilla on Instagram

© 2005-2025 Mozilla and individual contributors. Content is available under these licenses.

  • Terms
  • Privacy
  • Cookies