aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/serviceworkerregistration/active/index.html
blob: cc492009a312143fc41b5b2667155db24e0d4d22 (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
---
title: ServiceWorkerRegistration.active
slug: Web/API/ServiceWorkerRegistration/active
translation_of: Web/API/ServiceWorkerRegistration/active
---
<div>{{SeeCompatTable}}{{APIRef("Service Workers API")}}</div>

<p>{{domxref("ServiceWorkerRegistration")}} 인터페이스의 <strong><code>active</code></strong> 속성은 {{domxref("ServiceWorker.state")}} 가 <code style="font-style: normal;">activating</code> 또는 <code style="font-style: normal;">activated</code> 상태인 서비스 워커를 반환한다. 이 속성은 <code style="font-style: normal;">null</code> 로 초기 설정되어 있다.</p>

<p>클라이언트들의 URL이 등록 scope 내에 있을 경우 active 워커는 {{domxref("ServiceWorkerClient")}} 를 제어한다. ({{domxref("ServiceWorkerContainer.register")}} 가 처음으로 호출될 때 그 <code>scope</code> 옵션은 정의된다.)</p>

<div class="note">
<p><strong>Note</strong>: 이 기능은 <a href="/en-US/docs/Web/API/Web_Workers_API">Web Workers</a> 에서 사용 가능하다.</p>
</div>

<h2 id="Syntax" name="Syntax" style="line-height: 30px; font-size: 2.14285714285714rem;">Syntax</h2>

<pre class="syntaxbox" style="font-size: 14px;">sw = ServiceWorker.active
</pre>

<h3 id="Value">Value</h3>

<p>현재 <code>activating</code> 또는 <code>activated</code> 상태에 있다면, {{domxref("ServiceWorker")}} 객체.</p>

<h2 id="Specifications" style="line-height: 30px; font-size: 2.14285714285714rem;">Specifications</h2>

<div></div>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col"><font face="Open Sans, sans-serif"><span style="font-weight: normal;">Specification</span></font></th>
   <th scope="col"><font face="Open Sans, sans-serif"><span style="font-weight: normal;">Status</span></font></th>
   <th scope="col"><font face="Open Sans, sans-serif"><span style="font-weight: normal;">Comment</span></font></th>
  </tr>
  <tr>
   <td>{{SpecName('Service Workers', '#service-worker-registration-active-attribute', 'ServiceWorkerRegistration.active')}}</td>
   <td>{{Spec2('Service Workers')}}</td>
   <td>Initial definition.<br>
     </td>
  </tr>
 </tbody>
</table>

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



<p>{{Compat("api.ServiceWorkerRegistration.active")}}</p>

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

<ul>
 <li><a href="/en-US/docs/Web/API/ServiceWorker_API/Using_Service_Workers">Using Service Workers</a></li>
 <li><a href="https://github.com/mdn/sw-test">Service workers basic code example</a></li>
 <li><a href="https://jakearchibald.github.io/isserviceworkerready/">Is ServiceWorker ready?</a></li>
 <li>{{jsxref("Promise")}}</li>
 <li><a href="/en-US/docs/Web/Guide/Performance/Using_web_workers">Using web workers</a></li>
</ul>