이동:

Document.hidden 읽기 전용 속성은 페이지가 숨겨졌는지 여부를 Boolean 값으로 나타냅니다.

예제

document.addEventListener("visibilitychange", function() {
  console.log(document.hidden);
  // 숨김 여부가 변했을 때의 행동
});

명세

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
hiddenChrome Full support 33
Full support 33
Full support 13
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Edge Full support 12Firefox Full support 18
Notes
Full support 18
Notes
Notes Since Firefox 56 it also returns true on Mac when the window is completely hidden by another non-translucent application.
No support 10 — 52
Prefixed
Prefixed Implemented with the vendor prefix: moz
IE Full support 10Opera Full support 12.1Safari Full support 7WebView Android Full support YesChrome Android Full support 33
Full support 33
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Edge Mobile Full support YesFirefox Android Full support 18
Notes
Full support 18
Notes
Notes Since Firefox 56 it also returns true on Mac when the window is completely hidden by another non-translucent application.
No support 10 — 52
Prefixed
Prefixed Implemented with the vendor prefix: moz
Opera Android Full support 12.1Safari iOS Full support 7Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.
Requires a vendor prefix or different name for use.
Requires a vendor prefix or different name for use.

문서 태그 및 공헌자

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