XUL:notificationbox
出典: MDC
« XUL リファレンス HOME [ 例 | 属性 | プロパティ | メソッド | 関連項目 ]
notificationbox は要素上に通知を表示するために使用します。一般的に、要素は browser になりますが、他の要素も使用されます。notification 要素は各通知のために使用され、各項目は自動的に作成されます。各 notification は必要なときに表示されます。
notificationbox は子要素を持つ垂直指向のボックスです。notification はボックスの一番上に表示されます。notification は dir 属性を reverse に設定することによって一番下に置かれます。
- メソッド
- appendNotification, getNotificationWithValue, removeAllNotifications, removeCurrentNotification, removeNotification, removeTransientNotifications
[編集] 例
<notificationbox flex="1"> <browser src="http://www.mozilla.org"/> </notificationbox>
[編集] 属性
|
XUL 要素からの継承 |
[編集] プロパティ
- currentNotification
- 型: notification element
- 現在表示されている notification 要素、または null。このプロパティは読み取り専用です。
- allNotifications
- 型: nodeList
- すべての通知の NodeList。このプロパティは読み取り専用です。
- notificationsHidden
- 型: boolean
- 通知エリアを隠すかどうかを指示します。
[編集] メソッド
- appendNotification( label , value , image , priority , buttons )
- 戻り値の型: element
- 新しい notification を作成し、その通知を表示します。既に他の notification が高い優先度で提供されている場合、新しい notification は、その背後に追加されます。
- label - notification 上に表示するラベル。
- value - notification の識別に使用される値。
- image - notification 上に表示する画像の URL。
- priority - 通知の優先度。優先レベルを参照。
- buttons - notification 上に表示するボタン記述の配列。
- 優先レベル :
- PRIORITY_INFO_LOW
- PRIORITY_INFO_MEDIUM
- PRIORITY_INFO_HIGH
- PRIORITY_WARNING_LOW
- PRIORITY_WARNING_MEDIUM
- PRIORITY_WARNING_HIGH
- PRIORITY_CRITICAL_LOW
- PRIORITY_CRITICAL_MEDIUM
- PRIORITY_CRITICAL_HIGH
- PRIORITY_CRITICAL_BLOCK
- ボタン :
- buttons 引数はボタン記述の配列です。各記述は次のプロパティを持つオブジェクトです:
- accessKey - ボタン上に表示するアクセスキー。
- callback - ボタンが活性化した時に呼び出される関数。この関数には二つの引数が渡されます:
- ボタンが関連付けられた <notification>。
- appendNotification に渡されるボタン記述。
- label - ボタン上に表示するラベル。
- popup - ボタンのための popup の id。null の場合、ボタンはボタンポップアップです。
- getNotificationWithValue( value )
- 戻り値の型: notification element
- 特定の value を持つ notification を取得します。value は appendNotification で notification を追加した時に指定されます。一致する value が見つからないときは
nullを返します。
- removeAllNotifications( immediate )
- 戻り値の型: なし
- すべての notification を削除します。
immediateがtrueの場合、メッセージはすぐに削除されます。immediateがfalseの場合、notification は slide transition を使用して削除されます。
- removeCurrentNotification
- 戻り値の型: なし
- 現在の notification を削除します。
- removeNotification( item )
- 戻り値の型: element
- notification を削除し、それが現在の item であった場合、次の notification を表示します。
- removeTransientNotifications( )
- 戻り値の型: なし
- persistence の値が 0 の notification のみを削除し、persistence の値が 0 以外である notification についてはその値を 1 減少します。
[編集] 関連項目
- 要素
- notification