aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/permissions/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ja/web/api/permissions/index.html')
-rw-r--r--files/ja/web/api/permissions/index.html62
1 files changed, 62 insertions, 0 deletions
diff --git a/files/ja/web/api/permissions/index.html b/files/ja/web/api/permissions/index.html
new file mode 100644
index 0000000000..83625bbae8
--- /dev/null
+++ b/files/ja/web/api/permissions/index.html
@@ -0,0 +1,62 @@
+---
+title: Permissions
+slug: Web/API/Permissions
+tags:
+ - API
+ - Experimental
+ - Interface
+ - Permissions
+ - Permissions API
+ - Reference
+translation_of: Web/API/Permissions
+---
+<p>{{APIRef("Permissions API")}}{{SeeCompatTable}}</p>
+
+<p><span class="seoSummary"><a href="/ja/docs/Web/API/Permissions_API">Permissions API</a> の <code>Permissions</code> インターフェイスは、パーミッションの照会および取り消しのためのメソッドなど、コアとなる Permission API 機能を提供します。</span></p>
+
+<h2 id="Methods" name="Methods">メソッド</h2>
+
+<dl>
+ <dt>{{domxref("Permissions.query()")}}</dt>
+ <dd>特定の API のパーミッションの状態を返します。</dd>
+ <dt>{{domxref("Permissions.request()")}}</dt>
+ <dd>特定の API を使用するパーミッションを要求します。 これは現在どのブラウザーもサポートしていません。</dd>
+ <dt>{{domxref("Permissions.revoke()")}}</dt>
+ <dd>特定の API に現在設定されているパーミッションを取り消します。</dd>
+</dl>
+
+<h2 id="Example" name="Example">例</h2>
+
+<pre class="brush: js">navigator.permissions.query({name:'geolocation'}).then(function(result) {
+ if (result.state == 'granted') {
+ showLocalNewsWithGeolocation();
+ } else if (result.state == 'prompt') {
+ showButtonToEnableLocalNews();
+ }
+ // パーミッションが拒否された場合は何もしないでください。
+});</pre>
+
+<h2 id="Specification" name="Specification">仕様</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">仕様</th>
+ <th scope="col">状態</th>
+ <th scope="col">コメント</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('Permissions API', '#permissions-interface', 'Permissions')}}</td>
+ <td>{{Spec2('Permissions API')}}</td>
+ <td>初期定義</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_Support" name="Browser_Support">ブラウザーの互換性</h2>
+
+<div>
+
+
+<p>{{Compat("api.Permissions")}}</p>
+</div>