blob: 0eca029edb64d9ea85339b0ba8347b0e6f35d44c (
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
---
title: PushManager.unregister()
slug: Web/API/PushManager/unregister
tags:
- API
- Deprecated
- Method
- Reference
- Simple Push API
- メソッド
translation_of: Web/API/PushManager/unregister
---
<div>{{deprecated_header}}{{ ApiRef("Push API")}}</div>
<p><strong><code>unregister()</code></strong> メソッドは、システムに特定の端点の登録を解除して削除するよう依頼するために使用していました。更新された API では、加入は {{domxref("PushSubscription.unsubscribe()")}} メソッドで登録解除することができます。</p>
<h2 id="Syntax" name="Syntax">構文</h2>
<pre class="syntaxbox">var <var>request</var> = navigator.push.unregister(<var>pushEndpoint</var>);</pre>
<h3 id="Properties" name="Properties">プロパティ</h3>
<dl>
<dt>pushEndpoint</dt>
<dd>登録解除する端点です。</dd>
</dl>
<h3 id="Return" name="Return">返値</h3>
<p>{{domxref("DOMRequest")}} オブジェクトで、このメソッド呼び出しの成功または失敗を扱います。</p>
<p>メソッドの呼び出しが成功した場合、リクエストの <code>result</code> が登録解除された端点を表す {{Anch("PushRegistration")}} オブジェクトになります。</p>
<h3 id="PushRegistration">PushRegistration</h3>
<p>このオブジェクトは無名の JavaScript オブジェクトで、以下のプロパティがあります。</p>
<dl>
<dt><code>pushEndpoint</code></dt>
<dd>端点の URL を表す文字列です。</dd>
<dt><code>version</code></dt>
<dd>プッシュ通知の端点の現在のバージョンです。</dd>
</dl>
<h2 id="Example" name="Example">例</h2>
<pre class="brush: js">var req = navigator.push.unregister(pushEndpoint);
req.onsuccess = function(e) {
var endpoint = req.result;
debug("Unregistered endpoint: " + endpoint );
}
req.onerror = function(e) {
debug("Error unregistering the endpoint: " + JSON.stringify(e));
}
</pre>
<h2 id="Specifications" name="Specifications">仕様書</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">仕様書</th>
<th scope="col">状態</th>
<th scope="col">備考</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName('Push API')}}</td>
<td>{{Spec2('Push API')}}</td>
<td><code>PushManager</code> インターフェイスを定義</td>
</tr>
</tbody>
</table>
<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>
<p>{{Compat("api.PushManager.register")}}</p>
<h2 id="See_also" name="See_also">関連情報</h2>
<ul>
<li>{{domxref("PushManager")}}</li>
<li>{{domxref("DOMRequest")}}</li>
</ul>
|