Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

notification

The notification is used to display an informative message. It will normally be used as part of a notificationbox. The box includes a button which the user can use to close the box.

Attributes
image, label, priority, persistence, type, value
Properties
accessibleType, control, image, label, priority, persistence, type, value
Methods
close

Examples

<notification label="This is a warning"/>

Attributes

image
Type: URI
The URI of the image to appear on the element. If this attribute is empty or left out, no image appears. The position of the image is determined by the dir and orient attributes.
label
Type: string
The label that will appear on the element. If this is left out, no text appears. For an editable menuitem element the value of this attribute is copied to the menulist.value property upon user selection of the menuitem.

 

persistence
Type: integer
The persistence may be set to a non-zero value so that the notificationbox's removeTransientNotifications method does not remove them. This may be used to close a set of notifications as a group without affecting other notifications.
priority
Type: integer
Numeric value that specifies the order in which the notifications appear. Should be one of the constants described in the notificationbox's appendNotification method.

 

type
Type: one of the values below
Indicates the type of notification, determined from the priority.
info
a notification that is of lesser importance.
warning
a normal warning notification.
critical
a critical notification.
value
Type: string
The string attribute allows you to associate a data value with an element. It is not used for any specific purpose, but you can access it with a script for your own use. Be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) Use another attribute like "value2" or "data-myAtt" (as in the HTML5 draft), as XUL does not require validation (less future-proof); 2) Use setAttributeNS() to put custom attributes in a non-XUL namespace (serializable and future-proof); 3) Use setUserData() (future-proof and clean, but not easily serializable). For user editable menulist elements, the contents, as visible to the user, are read and set using the Menulist.value syntax. For those elements, setAttribute("value", myValue) and getAttribute("value") do not access or affect the contents displayed to the user.

 

Properties

accessibleType
Type: integer
A value indicating the type of accessibility object for the element.
image
Type: image URL
Gets and sets the value of the image attribute.
label
Type: string
Gets and sets the value of the label attribute.
persistence
Type: integer
Gets and sets the value of the persistence attribute.
priority
Type: string
Gets and sets the value of the priority attribute.
type
Type: string
Gets and sets the value of the type attribute.
value
Type: string
Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax.

 

Methods

Inherited Methods
addEventListener(), appendChild(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature(), getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), hasChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), removeChild(), removeEventListener(), replaceChild(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData

close()
Return type: no return value
Closes the notification or findbar and removes it from its enclosing notificationbox or findbar.

Elements
notificationbox

Document Tags and Contributors

 Last updated by: Sheppy,