aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/manifest/scope/index.md
blob: 68390b3bddd470ae288e87ca6240fd61b2c2d738 (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
---
title: scope
slug: Web/Manifest/scope
tags:
  - マニフェスト
  - ウェブ
  - scope
browser-compat: html.manifest.scope
translation_of: Web/Manifest/scope
---
{{QuickLinksWithSubpages("/ja/docs/Web/Manifest")}}

<table class="properties">
  <tbody>
    <tr>
      <th scope="row">型</th>
      <td><code>String</code></td>
    </tr>
    <tr>
      <th scope="row">必須</th>
      <td>いいえ</td>
    </tr>
  </tbody>
</table>

_`scope`_ メンバーは文字列型で、このウェブアプリケーションのアプリケーションコンテキストのナビゲーションスコープを定義します。これは、マニフェストが適用されている時に見ることができるウェブページを制限するものです。ユーザーがスコープ外へ移動した場合は、ブラウザータブやウィンドウの中の通常のウェブページに戻ります。

`scope` が相対 URL である場合、ベース URL はマニフェストの URL になります。

## 例

スコープが相対 URL の場合は、マニフェストの URL がベース URL として使用されます。

```json
"scope": "/app/"
```

以下のスコープは、ナビゲーションを現在のサイトに制限します。

```json
"scope": "https://example.com/"
```

最後に、以下の例はナビゲーションを現在のサイトのサブディレクトリーに制限します。

```json
"scope": "https://example.com/subdirectory/"
```

## 仕様書

{{Specifications}}

## ブラウザーの互換性

{{Compat}}