aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/api/serviceworker/scripturl/index.html
blob: a0453d4354f54891a88cf16f5392f09404ee2ee9 (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
---
title: ServiceWorker.scriptURL
slug: Web/API/ServiceWorker/scriptURL
translation_of: Web/API/ServiceWorker/scriptURL
---
<div>{{APIRef("Service Workers API")}}</div>

<p>Возвращает URL, указывающий на скрипт данного Service Worker, определённый с помощью <a href="https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration" title="ServiceWorkerRegistion is an interface object representing the service worker registration. You register a service worker to control one or more pages that share the same origin."><code>ServiceWorkerRegistration</code></a>. URL должен находиться в том же домене, что и документ, регистрирующий <code>ServiceWorker</code>.</p>

<h2 id="Syntax" name="Syntax">Синтаксис</h2>

<pre class="syntaxbox">someURL = ServiceWorker.scriptURL
</pre>

<h3 id="Значение">Значение</h3>

<p>{{domxref("USVString")}} (см. <a href="http://heycam.github.io/webidl/#idl-USVString">WebIDL-определение USVString</a>.)</p>

<h2 id="Примеры">Примеры</h2>

<pre class="brush: js">TBD</pre>

<h2 id="Спецификации">Спецификации</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Спецификация</th>
   <th scope="col">Статус</th>
   <th scope="col">Комментарий</th>
  </tr>
  <tr>
   <td>{{SpecName('Service Workers', '#service-worker-url', 'scriptURL')}}</td>
   <td>{{Spec2('Service Workers')}}</td>
   <td>Изначальное определение</td>
  </tr>
 </tbody>
</table>

<h2 id="Поддержка_в_браузерах">Поддержка в браузерах</h2>

<div>


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