JavaScript

[ScreenOrientation] JS - ScreenOrientation 객체 - 장치 방향 정보 갖는 객체 (= 스크린오리엔테이션 객체)

목차

  1. ScreenOrientation 객체 정의
  2. ScreenOrientation 객체의 속성
  3. ScreenOrientation 객체의 메서드

 

ScreenOrientation 객체 정의

 

ScreenOrientation 인터페이스는 현재 문서가 포함된 화면 방향 정보 제공.

 

※ 3개의 속성(property: 값)과 2개의 메서드(method: 동작) 내장.

 

ScreenOrientation 객체의 속성

 

ScreenOrientation.type

읽기 전용. 장치 방향 표시. 아래 값 중 하나 반환.

  • "portrait-primary"
  • "portrait-secondary"
  • "landscape-primary"
  • "landscape-secondary"

 

ScreenOrientation.angle 속성

읽기 전용. 문서의 현재 방향 각도 반환.


ScreenOrientation.onchange 속성 ★★★

화면 방향 바뀔 때마다 호출되는 이벤트 핸들러.

 

 

ScreenOrientation 객체의 메서드

 

ScreenOrientation.lock() 메서드

포함하는 문서의 방향을 기본 방향으로 잠그고 Promise 반환. 


ScreenOrientation.unlock() 메서드

포함하는 문서의 방향을 기본 방향에서 잠금 해제.

 



분류 제목
DOM_Element JS - dataset 속성 ★★★ - 데이터셋 속성 (= dataset속성) ※ div태그를 iframe태…
js JS - play(), pause() 메서드 - 동영상 재생/멈춤. (= play메서드, pause메서드 =…
Window_Object JS - devicePixelRatio 속성 ★ - 기기 픽셀 비율. ※ PC, 모바일 구별하기
js JS - 입력값 길이 제한 후, 경고창 띄우기
js JS - 눈 내리는 효과 (Snowflakes effect)
js JS - CSS 다크모드 토글 (Dark Mode Toggle) ※ 클래스 상호 대체/변환
DOM_Style JS - pointerEvents 속성 - 마우스 포인트 이벤트에 대한 반응 여부. (= pointerEve…
js JS - 스크롤 정도/위치 진행바 표시기 (Scroll Indicator Bar)
Form JS - input 태그의 name 속성값이 배열일 때, value값 가져오기 (= 폼태그 안 인풋 태그 네…
js JS - 숫자 (카운팅/변동) 애니 효과
DOM_Event JS - orientationchange 이벤트 - 장치 방향 바뀜 이벤트 (= 오리엔테이션체인지 이벤트) …
ScreenOrientation JS - ScreenOrientation 객체 - 장치 방향 정보 갖는 객체 (= 스크린오리엔테이션 객체)
ScreenOrientation JS - ScreenOrientation.type 속성 - 장치 방향 표시 (= 스크린오리엔테이션타입 속성)
ScreenOrientation JS - ScreenOrientation.angle 속성 - 문서의 현재 방향 각도 반환 (= 스크린오리엔테…
ScreenOrientation JS - ScreenOrientation.onchange 속성 ★ - 장치 방향 변경 이벤트 (= 스크린오리…
84/89
목록
 홈  PC버전 로그인 일본어
그누앞단언어
그누뒷단언어
그외코딩언어
그누보드
제작의뢰
Q&A
커뮤니티 1
웹유틸
회원센터
홈짱닷컴 PC버전 로그인