XUL:NotificationBox: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1: Line 1:
== <notificationbox> ==
= <notificationbox> =


'''<code>&lt;notificationbox&gt;</code>''' is used to display notifications above an element. Typically the element will be a browser, but any element may be used. The &lt;notification&gt; element is used for each notification, and will be created automatically for each item. Each notification will slide in and out as needed.
'''<code>&lt;notificationbox&gt;</code>''' is used to display notifications above an element. Typically the element will be a browser, but any element may be used. The &lt;notification&gt; element is used for each notification, and will be created automatically for each item. Each notification will slide in and out as needed.


The notification box is a vertical box which may have children. The notifications appear at the top of the box. The notifications may be placed at the bottom by setting the dir attribute to reverse.
The notification box is a vertical box which may have children. The notifications appear at the top of the box. The notifications may be placed at the bottom by setting the <code>dir</code> attribute to <code>"reverse"</code>.


== XUL Syntax ==
== XUL Syntax ==
Line 9: Line 9:
   <browser src="<nowiki>http://www.mozilla.org</nowiki>"/>
   <browser src="<nowiki>http://www.mozilla.org</nowiki>"/>
  </notificationbox>
  </notificationbox>
== Priority Levels ==
Notifications with higher priority levels appear above those with lower priorities.
; 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


== Properties ==
== Properties ==


; currentNotification : The currently displayed notification
; currentNotification : The currently displayed notification. (Needs a more elaborate description.)
; allNotifications : NodeList of all notifications
; allNotifications : ''readonly'' NodeList of all notifications
; notificationsHidden : true if the notification area should be hidden
; notificationsHidden : boolean indicating whether the notification area should be hidden


== Methods ==
== Methods ==
Line 65: Line 50:
  popup - the id of a popup for the button. If null, the button is a button popup.
  popup - the id of a popup for the button. If null, the button is a button popup.


== &lt;notification&gt; ==
= &lt;notification&gt; =


'''<code>&lt;notification&gt;</code>''' is used to display an informative message. It will
'''<code>&lt;notification&gt;</code>''' is used to display an informative message. It will
Line 90: Line 75:


; close : Closes the notification and removes it from its enclosing &lt;notificationbox&gt;
; close : Closes the notification and removes it from its enclosing &lt;notificationbox&gt;
= Priority Levels =
Notifications with higher priority levels appear above those with lower priorities. These constants are defined on the notificationbox binding and can be obtained from any <notificationbox> element.
; 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
Confirmed users
162

edits