aboutsummaryrefslogtreecommitdiff
path: root/files/ja/archive/mozilla/xul/notificationbox/index.html
blob: fe247bf68ff168bee958d28b44092fc403102560 (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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
---
title: notificationbox
slug: Archive/Mozilla/XUL/notificationbox
tags:
  - XUL Elements
  - XUL Reference
translation_of: Archive/Mozilla/XUL/notificationbox
---
<div class="noinclude"><span class="breadcrumbs XULRef_breadcrumbs">
 « <a href="/ja/docs/XUL/XUL_Reference">XUL リファレンス HOME</a>    [
 <a href="#Examples"></a> |
 <a href="#Attributes">属性</a> |
 <a href="#Properties">プロパティ</a> |
 <a href="#Methods">メソッド</a> |
 <a href="#Related">関連項目</a> ]
</span></div>
<p><code><a href="/ja/docs/Mozilla/Tech/XUL/notificationbox" title="notificationbox">notificationbox</a></code> は要素上に通知を表示するために使用します。一般的に、要素は browser になりますが、他の要素も使用されます。<code><a href="/ja/docs/Mozilla/Tech/XUL/notification" title="notification">notification</a></code> 要素は各通知のために使用され、各項目は自動的に作成されます。各 notification は必要なときに表示されます。この要素は、例えば様々な Firefox ウィンドウに黄色の情報バーを実装するために使用されます。</p>
<p><code><a href="/ja/docs/Mozilla/Tech/XUL/notificationbox" title="notificationbox">notificationbox</a></code> は子要素を持つ垂直指向のボックスです。notification はボックスの一番上に表示されます。notification は <code id="a-dir"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/dir">dir</a></code> 属性を <code>reverse</code> に設定することによって一番下に置かれます。</p>
<h3 id="Finding_the_current_notification_box" name="Finding_the_current_notification_box">現在の notification ボックスを見つけるには</h3>
<p>Firefox の拡張機能内では、特定のタブの現在の notification ボックスをグローバル関数の <code>getNotificationBox()</code> を呼び出すことによって受け取ってください:</p>
<pre>notifyBox = chromeWin.getNotificationBox(notifyWindow);
</pre>
<p>ここでは、<code>chromeWin</code> は XUL window (通常はただの <code>window</code>)、<code>notifyWindow</code> は notification ボックスを見つけたいタブの Web コンテンツウィンドウです。</p>
<dl><dt> プロパティ </dt><dd> <a href="#p-currentNotification">currentNotification</a>, <a href="#p-allNotifications">allNotifications</a>, <a href="#p-notificationsHidden">notificationsHidden</a> </dd></dl> <dl><dt> メソッド </dt><dd> <a href="#m-appendNotification">appendNotification</a>, <a href="#m-getNotificationWithValue">getNotificationWithValue</a>, <a href="#m-removeAllNotifications">removeAllNotifications</a>, <a href="#m-removeCurrentNotification">removeCurrentNotification</a>, <a href="#m-removeNotification">removeNotification</a>, <a href="#m-removeTransientNotifications">removeTransientNotifications</a> </dd></dl>
<h3 id="Examples" name="Examples"></h3>
<pre>&lt;notificationbox flex="1"&gt;
  &lt;browser src="http://www.mozilla.org"/&gt;
&lt;/notificationbox&gt;
</pre>
<h3 id="Attributes" name="Attributes">属性</h3>
<table style="border: 1px solid rgb(204, 204, 204); margin: 0 0 10px 10px; padding: 0 10px; background: rgb(238, 238, 238);">
<tbody>
<tr>
<td><p><strong>XUL 要素からの継承</strong><br> <small>
<code id="a-align"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/align">align</a></code>,
<code id="a-allowevents"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/allowevents">allowevents</a></code>,
<code id="a-allownegativeassertions"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/allownegativeassertions">allownegativeassertions</a></code>,
<code id="a-class"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/class">class</a></code>,
<code id="a-coalesceduplicatearcs"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/coalesceduplicatearcs">coalesceduplicatearcs</a></code>,
<code id="a-collapsed"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/collapsed">collapsed</a></code>,
<code id="a-container"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/container">container</a></code>,
<code id="a-containment"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/containment">containment</a></code>,
<code id="a-context"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/context">context</a></code>,
<code id="a-contextmenu"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/contextmenu">contextmenu</a></code>,
<code id="a-datasources"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/datasources">datasources</a></code>,
<code id="a-dir"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/dir">dir</a></code>,
<code id="a-empty"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/empty">empty</a></code>,
<code id="a-equalsize"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/equalsize">equalsize</a></code>,
<code id="a-flags"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/flags">flags</a></code>,
<code id="a-flex"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/flex">flex</a></code>,
<code id="a-height"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/height">height</a></code>,
<code id="a-hidden"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/hidden">hidden</a></code>,
<code id="a-id"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/id">id</a></code>,
<code id="a-insertafter"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/insertafter">insertafter</a></code>,
<code id="a-insertbefore"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/insertbefore">insertbefore</a></code>,
<code id="a-left"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/left">left</a></code>,
<code id="a-maxheight"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/maxheight">maxheight</a></code>,
<code id="a-maxwidth"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/maxwidth">maxwidth</a></code>,
<code id="a-menu"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/menu">menu</a></code>,
<code id="a-minheight"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/minheight">minheight</a></code>,
<code id="a-minwidth"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/minwidth">minwidth</a></code>,
<code id="a-mousethrough"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/mousethrough">mousethrough</a></code>,
<code id="a-observes"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/observes">observes</a></code>,
<code id="a-ordinal"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/ordinal">ordinal</a></code>,
<code id="a-orient"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/orient">orient</a></code>,
<code id="a-pack"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/pack">pack</a></code>,
<code id="a-persist"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/persist">persist</a></code>,
<code id="a-popup"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/popup">popup</a></code>,
<code id="a-position"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/position">position</a></code>,
<code id="a-preference-editable"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/preference-editable">preference-editable</a></code>,
<code id="a-querytype"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/querytype">querytype</a></code>,
<code id="a-ref"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/ref">ref</a></code>,
<code id="a-removeelement"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/removeelement">removeelement</a></code>,
<code id="a-sortDirection"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/sortDirection">sortDirection</a></code>,
<code id="a-sortResource"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/sortResource">sortResource</a></code>,
<code id="a-sortResource2"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/sortResource2">sortResource2</a></code>,
<code id="a-statustext"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/statustext">statustext</a></code>,
<code id="a-style"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/style">style</a></code>,
<code id="a-template"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/template">template</a></code>,
<code id="a-tooltip"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/tooltip">tooltip</a></code>,
<code id="a-tooltiptext"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/tooltiptext">tooltiptext</a></code>,
<code id="a-top"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/top">top</a></code>,
<code id="a-uri"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/uri">uri</a></code>,
<code id="a-wait-cursor"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/wait-cursor">wait-cursor</a></code>,
<code id="a-width"><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Attribute/width">width</a></code> </small></p>
</td>
</tr>
</tbody>
</table>
<h3 id="Properties" name="Properties">プロパティ</h3>
<div id="p-currentNotification">
<dl><dt> <code><span><a href="http://api/ja/docs/XUL/Property/currentNotification">currentNotification</a></span></code> </dt><dd> 型: <em><code><a href="/ja/docs/Mozilla/Tech/XUL/notification" title="notification">notification</a></code> 要素</em> </dd><dd> 現在表示されている <code><a href="/ja/docs/Mozilla/Tech/XUL/notification" title="notification">notification</a></code> 要素、または null。このプロパティは読み取り専用です。 </dd></dl>
</div> <div id="p-allNotifications">
<dl>
  <dt>
    <code><span><a href="http://api/ja/docs/XUL/Property/allNotifications">allNotifications</a></span></code></dt>
  <dd>
    型: <em>nodeList</em></dd>
  <dd>
    すべての通知の NodeList。このプロパティは読み取り専用です。</dd>
</dl></div> <div id="p-notificationsHidden">
<dl><dt> <code><span><a href="https://developer.mozilla.org/ja/docs/XUL/Property/notificationsHidden">notificationsHidden</a></span></code> </dt><dd> 型: <em>論理型</em> </dd><dd> 通知エリアを隠すかどうかを指示します。 </dd></dl>
</div>
<h3 id="Methods" name="Methods">メソッド</h3>
<table style="border: 1px solid rgb(204, 204, 204); margin: 0 0 10px 10px; padding: 0 10px; background: rgb(238, 238, 238); float: right; width: 250px;">
<tbody>
<tr>
<td>
<p><strong>XUL 要素からの継承</strong><br>
<small> <span id="m-blur"><code><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Method/blur">blur</a></code></span>, <span id="m-click"><code><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Method/click">click</a></code></span>, <span id="m-doCommand"><code><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Method/doCommand">doCommand</a></code></span>, <span id="m-focus"><code><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Method/focus">focus</a></code></span>, <span id="m-getElementsByAttribute"><code><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Method/getElementsByAttribute">getElementsByAttribute</a></code></span> <span id="m-getElementsByAttributeNS"><code><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Method/getElementsByAttributeNS">getElementsByAttributeNS</a></code></span></small></p> <p><strong>DOM 要素からの継承</strong><br>
<small> <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.addEventListener">addEventListener()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.appendChild">appendChild()</a></code>, <a href="/ja/DOM/Node.compareDocumentPosition" title="ja/DOM/Node.compareDocumentPosition">compareDocumentPosition</a>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.dispatchEvent">dispatchEvent()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.getAttribute">getAttribute()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.getAttributeNode">getAttributeNode()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.getAttributeNodeNS">getAttributeNodeNS()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.getAttributeNS">getAttributeNS()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.getElementsByTagName">getElementsByTagName()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.getElementsByTagNameNS">getElementsByTagNameNS()</a></code>, <a href="/ja/DOM/Node.getFeature" title="ja/DOM/Node.getFeature">getFeature</a>, <a href="/ja/DOM/Node.getUserData" title="ja/DOM/Node.getUserData">getUserData</a>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.hasAttribute">hasAttribute()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.hasAttributeNS">hasAttributeNS()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.hasAttributes">hasAttributes()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.hasChildNodes">hasChildNodes()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.insertBefore">insertBefore()</a></code>, <a href="/ja/DOM/Node.isEqualNode" title="ja/DOM/Node.isEqualNode">isEqualNode</a>, <a href="/ja/DOM/Node.isSameNode" title="ja/DOM/Node.isSameNode">isSameNode</a>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.isSupported">isSupported()</a></code>, <a href="/ja/DOM/Node.lookupNamespaceURI" title="ja/DOM/Node.lookupNamespaceURI">lookupNamespaceURI</a>, <a href="/ja/DOM/Node.lookupPrefix" title="ja/DOM/Node.lookupPrefix">lookupPrefix</a>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.normalize">normalize()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.removeAttribute">removeAttribute()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.removeAttributeNode">removeAttributeNode()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.removeAttributeNS">removeAttributeNS()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.removeChild">removeChild()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.removeEventListener">removeEventListener()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.replaceChild">replaceChild()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.setAttribute">setAttribute()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.setAttributeNode">setAttributeNode()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.setAttributeNodeNS">setAttributeNodeNS()</a></code>, <code><a href="https://developer.mozilla.org/ja/docs/DOM/element.setAttributeNS">setAttributeNS()</a></code>, <a href="/ja/DOM/Node.setUserData" title="ja/DOM/Node.setUserData">setUserData</a></small></p>

</td>
</tr>
</tbody>
</table> <dl>
 <dt><span id="m-appendNotification"><code><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Method/appendNotification">appendNotification( label , value , image , priority , buttons )</a></code></span></dt>
 <dd>戻り値の型: <em>要素</em></dd>
 <dd>新しい notification を作成し、その通知を表示します。既に他の notification が高い優先度で提供されている場合、新しい notification は、その背後に追加されます。</dd>
</dl>

<ul>
 <li>label - notification 上に表示するラベル。</li>
 <li>value - notification の識別に使用される値。</li>
 <li>image - notification 上に表示する画像の URL。</li>
 <li>priority - 通知の優先度。優先レベルを参照。</li>
 <li>buttons - notification 上に表示するボタン記述の配列。</li>
 <li>eventCallback <span class="inlineIndicator optional optionalInline">Optional</span>  - a JavaScript function to call to notify you of interesting things that happen with the notification box. See <a href="/ja/docs/XUL/Method/appendNotification#Notification_box_events" title="XUL/Method/appendNotification#Notification_box_events">Notification box events</a>.</li>
</ul>

<dl>
 <dt>優先レベル :</dt>
 <dd>
 <ul>
  <li>PRIORITY_INFO_LOW</li>
  <li>PRIORITY_INFO_MEDIUM</li>
  <li>PRIORITY_INFO_HIGH</li>
  <li>PRIORITY_WARNING_LOW</li>
  <li>PRIORITY_WARNING_MEDIUM</li>
  <li>PRIORITY_WARNING_HIGH</li>
  <li>PRIORITY_CRITICAL_LOW</li>
  <li>PRIORITY_CRITICAL_MEDIUM</li>
  <li>PRIORITY_CRITICAL_HIGH</li>
  <li>PRIORITY_CRITICAL_BLOCK</li>
 </ul>
 </dd>
 <dt>ボタン :</dt>
 <dd>buttons 引数はボタン記述の配列です。各記述は次のプロパティを持つオブジェクトです:
 <ul>
  <li>accessKey - ボタン上に表示するアクセスキー。</li>
  <li>callback - ボタンが活性化した時に呼び出される関数。この関数には二つの引数が渡されます:
   <ul>
    <li>ボタンが関連付けられた &lt;notification&gt;</li>
    <li>appendNotification に渡されるボタン記述。</li>
   </ul>
  </li>
  <li>label - ボタン上に表示するラベル。</li>
  <li>popup - ボタンのための popup の id。null の場合、ボタンはボタンポップアップです。</li>
 </ul>
 </dd>
</dl> <dl>
  <dt><span id="m-getNotificationWithValue"><code><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Method/getNotificationWithValue">getNotificationWithValue( value )</a></code></span></dt>
  <dd>戻り値の型: <em>notification 要素</em></dd>
  <dd>特定の value を持つ <a href="/ja/docs/XUL/notification" title="XUL/notification">notification</a> を取得します。value は <a href="/ja/docs/XUL/Method/appendNotification" title="XUL/Method/appendNotification">appendNotification</a> で notification を追加した時に指定されます。一致する value が見つからないときは <code>null</code> を返します。</dd>
</dl> <dl>
  <dt><span id="m-removeAllNotifications"><code><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Method/removeAllNotifications">removeAllNotifications( immediate )</a></code></span></dt>
  <dd>戻り値の型: 無し</dd>
  <dd>すべての <code>notification</code> を削除します。 <code>immediate</code><code>true</code> の場合、メッセージはすぐに削除されます。<code>immediate</code><code>false</code> の場合、 <code>notification</code> は slide transition を使用して削除されます。</dd>
</dl> <dl>
  <dt><span id="m-removeCurrentNotification"><code><a href="http://api/ja/docs/Mozilla/Tech/XUL/Method/removeCurrentNotification">removeCurrentNotification</a></code></span></dt>
  <dd>戻り値の型: 無し</dd>
  <dd>現在の <code>notification</code> を削除します。</dd>
</dl> <dl>
  <dt><span id="m-removeNotification"><code><a href="https://developer.mozilla.org/ja/docs/Mozilla/Tech/XUL/Method/removeNotification">removeNotification( item )</a></code></span></dt>
  <dd>戻り値の型: <em>要素</em></dd>
  <dd><code>notification</code> を削除し、それが現在の <code>item</code> であった場合、次の <code>notification</code> を表示します。</dd>
</dl> <dl>
  <dt><span id="m-removeTransientNotifications"><code><a href="http://api/ja/docs/Mozilla/Tech/XUL/Method/removeTransientNotifications">removeTransientNotifications( )</a></code></span></dt>
  <dd>戻り値の型: <em>無し</em></dd>
  <dd>persistence の値が 0 の notification のみを削除し、 persistence の値が 0 以外の notification についてはその値を 1 減らします。</dd>
</dl>
<h3 id="Related" name="Related">関連項目</h3>
<dl><dt> 要素 </dt><dd> <code><a href="/ja/docs/Mozilla/Tech/XUL/notification" title="notification">notification</a></code> </dd></dl>
<div class="noinclude">

</div>