aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/document/visibilitychange_event/index.html
blob: d15b1d3d38d65a161012cfaded6f2fedad819ba1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
title: visibilitychange
slug: Web/API/Document/visibilitychange_event
tags:
  - API
  - Event
  - Reference
  - Web
translation_of: Web/API/Document/visibilitychange_event
---
<div>{{APIRef}}</div>

<p><code>visibilitychange</code> 이벤트는 브라우저 탭의 컨텐츠가 visible 또는 hidden 상태로 변화할 때 발생된다.</p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row">Bubbles</th>
   <td>Yes</td>
  </tr>
  <tr>
   <th scope="row">Cancelable</th>
   <td>No</td>
  </tr>
  <tr>
   <th scope="row">Interface</th>
   <td>{{domxref("event")}}</td>
  </tr>
  <tr>
   <th scope="row">Event handler property</th>
   <td>{{domxref("Document.onvisibilitychange", "onvisibilitychange")}}</td>
  </tr>
 </tbody>
</table>

<h2 id="예제">예제</h2>

<pre class="brush:js;">document.addEventListener("visibilitychange", function() {
  console.log( document.visibilityState );
});
</pre>

<h2 id="명세">명세</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('Page Visibility API','#sec-visibilitychange-event','visibilitychange')}}</td>
   <td>{{Spec2('Page Visibility API')}}</td>
   <td> </td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility" name="Browser_compatibility">브라우저 호환성</h2>

<p>{{Compat("api.Document.visibilitychange")}}</p>

<h2 id="같이_보기">같이 보기</h2>

<ul>
 <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API">Page Visibility API</a></li>
 <li><a href="https://developer.mozilla.org/en-US/docs/DOM/Using_the_Page_Visibility_API" title="DOM/Using_the_Page_Visibility_API">Using the Page Visibility API</a></li>
 <li>{{domxref("Document.visibilityState")}}</li>
</ul>