이 번역은 완료되지 않았습니다. 이 문서를 번역해 주세요.

visibilitychange event 는 브라우저 탭의 컨텐츠가 visible 또는 hidden 상태로 변화할 때 발생된다.

General info

Specification
Page Visibility (Second Edition)
Interface
event
Bubbles
Yes
Cancelable
No
Target
Document
Default Action
None

Properties

Property Type Description
target Read only EventTarget The event target (the topmost target in the DOM tree).
type Read only DOMString The type of event.
bubbles Read only Boolean Whether the event normally bubbles or not.
cancelable Read only Boolean Whether the event is cancellable or not.

Example

document.addEventListener("visibilitychange", function() {
  console.log( document.visibilityState );
});

Specifications

Specification Status Comment
Page Visibility (Second Edition)
The definition of 'visibilitychange' in that specification.
Recommendation  

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 13 webkit
33
10 (10) moz
18 (18)
10

12.10[1]

6.1
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support 4.4 webkit 10.0 (10) moz
18.0 (18)
? 12.10 [1] 7

[1] browser window 가 최소화되거나, hidden 을 true 로 설정할 때, visibilitychange event 는 발생되지 않는다.

See also

문서 태그 및 공헌자

이 페이지의 공헌자: fscholz, dragmove
최종 변경자: fscholz,