Help us test MDN's new front-end: https://discourse.mozilla.org/t/help-us-test-mdns-new-react-front-end-beta/42593

window.screen.unlockOrientation

Deprecated
This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

Screen.unlockOrientation() 함수는 이전의 page나 앱을 통해 지정한 화면 고정 값들을 모두 제거 한다.

Note: 이 함수는 설치된 웹앱 또는 full-screen mode 의 웹 페이지들에서 동작한다..

Syntax

var unlocked = window.screen.unlockOrientation();

Return value

성공적으로 unlocked 된 경우 true 를 반환하며, 만약 방향이 unlock 될 수 없다면 false 를 반환한다.

Example

if (window.screen.unlockOrientation()) {
  // orientation was unlocked
} else {
  // orientation unlock failed
}

Specifications

Specification Status Comment
Screen Orientation API
The definition of 'Screen Orientation' in that specification.
Working Draft Draft specification

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
unlockOrientationChrome Full support 38Edge ? Firefox Full support Yes
Prefixed
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: moz
IE Full support 11
Prefixed
Full support 11
Prefixed
Prefixed Implemented with the vendor prefix: ms
Opera Full support YesSafari No support NoWebView Android Full support 38Chrome Android Full support 38Edge Mobile ? Firefox Android Full support Yes
Prefixed
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: moz
Opera Android Full support YesSafari iOS No support NoSamsung Internet Android Full support Yes

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Requires a vendor prefix or different name for use.
Requires a vendor prefix or different name for use.

See also

문서 태그 및 공헌자

이 페이지의 공헌자: alattalatta, mdnwebdocs-bot, fscholz, junho85
최종 변경자: alattalatta,