This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes.
Summary
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
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | Not supported | (Yes) moz | Not supported | Not supported | Not supported |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | Not supported | Not supported | (Yes) moz | Not supported | Not supported | Not supported |
Gecko notes
이 API 현재 초안형태이다. 오직 B2G 와 안드로이도용 Firefox에서 prefixed method (mozUnlockOrientation
) 로만 구현된다.