aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/idledeadline/index.html
blob: 0ebb4614824a438c833575ed852a871ee6be10f8 (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
---
title: IdleDeadline
slug: Web/API/IdleDeadline
translation_of: Web/API/IdleDeadline
---
<div>{{APIRef("Background Tasks")}}</div>

<div id="interface_description">
<p><code>IdleDeadline</code> 인터페이스는 {{domxref("Window.requestIdleCallback()")}}을 호출하여 설정된 유휴 콜백(idle callback)에 대한 입력 매개변수(parameter)의 데이터 타입으로 사용됩니다. {{domxref("IdleDeadline.timeRemaining", "timeRemaining()")}} 메서드를 제공하여 사용자 에이전트가 유휴 상태로있을 것으로 추정하는 시간과 속성(property)인 {{domxref("IdleDeadline.didTimeout", "didTimeout")}}을 결정할 수있게하여, timeout 기간이 만료되어 콜백이 실행 중인지 여부를 결정할 수 있습니다.</p>

<p>request callback이 작동하는 방식에 대해 자세히알아 보려면, <a href="/ko/docs/Web/API/Background_Tasks_API">Collaborative Scheduling of Background Tasks</a> 문서를 읽어보세요.</p>
</div>

<h2 id="Properties">Properties</h2>

<dl id="property_definitions">
 <dt>{{domxref("IdleDeadline.didTimeout")}} {{ReadOnlyInline}}</dt>
 <dd>유휴 콜백을 구현할 때 지정한 timeout이 만료되었음에도 콜백이 실행중인 경우, 값이 true인 Boolean 입니다.</dd>
</dl>

<h2 id="methods" name="methods">Methods</h2>

<dl id="method_definitions">
 <dt>{{domxref("IdleDeadline.timeRemaining()")}}</dt>
 <dd>현재 유휴 기간(idle period)에 남아있는 밀리초 수를 예측하는 부동 소수점 값인 {{domxref("DOMHighResTimeStamp")}}를 반환합니다. 유휴 기간이 끝나면 값은 0 입니다. 우리의 콜백은 이것을 반복적으로 호출하여, 반환하기 전에 더 많은 작업을 할 수 있는 충분한 시간이 있는지 확인할 수 있습니다.</dd>
</dl>

<dl id="method_definitions_obsolete">
</dl>

<h2 id="Example" name="Example">Example</h2>

<p><a href="/ko/docs/Web/API/Background_Tasks_API">Cooperative Scheduling of Background Tasks API</a>의 <a href="/ko/docs/Web/API/Background_Tasks_API#Example">complete example</a>를 참조하세요.</p>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName("Background Tasks")}}</td>
   <td>{{Spec2("Background Tasks")}}</td>
   <td> </td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<div>


<p>{{Compat("api.IdleDeadline")}}</p>
</div>

<h2 id="See_also">See also</h2>

<ul>
 <li><a href="/en-US/docs/Web/API/Background_Tasks_API">Cooperative Scheduling of Background Tasks API</a></li>
 <li>{{domxref("Window.requestIdleCallback()")}}</li>
 <li>{{domxref("Window.cancelIdleCallback()")}}</li>
</ul>