--- title: notificationbox slug: Archive/Mozilla/XUL/notificationbox tags: - XUL Elements - XUL Reference translation_of: Archive/Mozilla/XUL/notificationbox ---
notificationbox は要素上に通知を表示するために使用します。一般的に、要素は browser になりますが、他の要素も使用されます。notification 要素は各通知のために使用され、各項目は自動的に作成されます。各 notification は必要なときに表示されます。この要素は、例えば様々な Firefox ウィンドウに黄色の情報バーを実装するために使用されます。
notificationbox は子要素を持つ垂直指向のボックスです。notification はボックスの一番上に表示されます。notification は dir 属性を reverse に設定することによって一番下に置かれます。
Firefox の拡張機能内では、特定のタブの現在の notification ボックスをグローバル関数の getNotificationBox() を呼び出すことによって受け取ってください:
notifyBox = chromeWin.getNotificationBox(notifyWindow);
ここでは、chromeWin は XUL window (通常はただの window)、notifyWindow は notification ボックスを見つけたいタブの Web コンテンツウィンドウです。
<notificationbox flex="1"> <browser src="http://www.mozilla.org"/> </notificationbox>
XUL 要素からの継承 |
currentNotification notification 要素 notification 要素、または null。このプロパティは読み取り専用です。 allNotificationsnotificationsHidden appendNotification( label , value , image , priority , buttons )getNotificationWithValue( value )null を返します。removeAllNotifications( immediate )notification を削除します。 immediate が true の場合、メッセージはすぐに削除されます。immediate が false の場合、 notification は slide transition を使用して削除されます。removeCurrentNotificationnotification を削除します。removeNotification( item )notification を削除し、それが現在の item であった場合、次の notification を表示します。removeTransientNotifications( )notification