aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/archive/b2g_os/api/navigator/mozhaspendingmessage/index.html
blob: ea7a00d867df246b9d81e6c08ce4e9e0bd6d50e8 (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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
title: Navigator.mozHasPendingMessage()
slug: Archive/B2G_OS/API/Navigator/mozHasPendingMessage
translation_of: Archive/B2G_OS/API/Navigator/mozHasPendingMessage
---
<p></p><section class="Quick_links" id="Quick_Links"><ol><li><strong><a href="/zh-CN/docs/Web/API/Archive"><code>Archive</code></a></strong></li><li class="toggle"><details open><summary>Related pages for Firefox OS</summary><ol><li><a href="/zh-CN/docs/Web/API/MozAlarmsManager"><code>MozAlarmsManager</code></a></li><li><a href="/zh-CN/docs/Web/API/MozMobileNetworkInfo"><code>MozMobileNetworkInfo</code></a></li><li><a href="/zh-CN/docs/Web/API/MozWifiP2pGroupOwner"><code>MozWifiP2pGroupOwner</code></a></li></ol></details></li></ol></section><div class="warning">
    <p style="text-align: center;">此 API 在 <a href="/zh-CN/docs/Mozilla/Firefox_OS">Firefox OS</a><a href="/zh-CN/docs/Mozilla/Firefox_OS/Security/Application_security#App_Types">网页内容或高权限的应用程序</a>上可用。</p>
</div><p></p>

<h2 id="概要">概要</h2>

<p>该方法用来用于判定一个给定类型(type)是否存在未决消息(待处理的消息),返回类型为是(true)或非(false)。</p>

<p><a href="/zh-CN/docs/Web/API/Window/navigator/mozSetMessageHandler" title="此页面仍未被本地化, 期待您的翻译!"><code>navigator.mozSetMessageHandler()</code></a> 用于设定一种类型的句柄时,待处理的消息会以异步的方式的传输给应用。 </p>

<h2 id="语法">语法</h2>

<pre>navigator.mozHasPendingMessage(type);</pre>

<h3 id="参数">参数</h3>

<dl>
 <dt><code>type</code></dt>
 <dd>类型是字符串,用于表示一个应用注册的处理函数要处理的消息。要获得有效type的完整列表,请参考<a href="/zh-CN/docs/Web/API/Window/navigator/mozSetMessageHandler" title="此页面仍未被本地化, 期待您的翻译!"><code>navigator.mozSetMessageHandler()</code></a>.</dd>
</dl>

<h2 id="返回值">返回值</h2>

<p>布尔类型。</p>

<h2 id="规范">规范</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">规范</th>
   <th scope="col">状态</th>
   <th scope="col">注解</th>
  </tr>
  <tr>
   <td><a class="external" hreflang="en" lang="en" title="Unknown">Unknown</a></td>
   <td><span class="spec-">Unknown</span></td>
   <td>定义了系统消息的接口</td>
  </tr>
 </tbody>
</table>

<h2 id="浏览器兼容性">浏览器兼容性</h2>

<p></p><p class="warning"><strong><a href="https://github.com/mdn/browser-compat-data">We're converting our compatibility data into a machine-readable JSON format</a></strong>.
            This compatibility table still uses the old format,
            because we haven't yet converted the data it contains.
            <strong><a href="/zh-CN/docs/MDN/Contribute/Structures/Compatibility_tables">Find out how you can help!</a></strong></p>

<div class="htab">
    <a id="AutoCompatibilityTable" name="AutoCompatibilityTable"></a>
    <ul>
        <li class="selected"><a>Desktop</a></li>
        <li><a>Mobile</a></li>
    </ul>
</div><p></p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari (WebKit)</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td><span style="color: #f00;">未实现</span></td>
   <td><span style="color: #f00;">未实现</span></td>
   <td><span style="color: #f00;">未实现</span></td>
   <td><span style="color: #f00;">未实现</span></td>
   <td><span style="color: #f00;">未实现</span></td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Firefox OS</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td><span style="color: #f00;">未实现</span></td>
   <td>1.0</td>
   <td><span style="color: #f00;">未实现</span></td>
   <td><span style="color: #f00;">未实现</span></td>
   <td><span style="color: #f00;">未实现</span></td>
   <td><span style="color: #f00;">未实现</span></td>
  </tr>
 </tbody>
</table>
</div>

<h2 id="参见">参见</h2>

<ul>
 <li><a href="/zh-CN/docs/Web/API/Window/navigator/mozSetMessageHandler" title="此页面仍未被本地化, 期待您的翻译!"><code>navigator.mozSetMessageHandler()</code></a></li>
 <li><a href="/en-US/docs/WebAPI/Web_Activities" title="/en-US/docs/WebAPI/Web_Activities">Web Activities</a></li>
 <li><a class="external" href="https://groups.google.com/forum/?fromgroups=#%21topic/mozilla.dev.webapi/o8bkwx0EtmM" title="https://groups.google.com/forum/?fromgroups=#!topic/mozilla.dev.webapi/o8bkwx0EtmM">Discussion on the Mozilla WebAPI mailing list.</a></li>
</ul>