Visit Mozilla.org

XUL:notification

From MDC

« XUL Reference home    [ Examples | Attributes | Properties | Methods | Related ]

The notification is used to display an informative message. It will normally be used as part of a notificationbox.

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

[edit] Examples

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

[edit] Attributes

Inherited from XUL element
align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortDirection, sortResource, sortResource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width

image
Type: image URL
The URL 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.

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.

[edit] Properties

Inherited from XUL element
align, allowEvents, boxObject, builder, className, collapsed, contextMenu, controllers, currentItem, database, datasources, dir, flex, height, hidden, id, left, listBoxObject, maxHeight, maxWidth, menu, minHeight, minWidth, observes, ordinal, orient, pack, persist, ref, resource, statusText, style, tooltip, tooltipText, top, value, width

Inherited from DOM element
attributes, childNodes, cloneNode, firstChild, lastChild, localName, namespaceURI, nextSibling, nodeName, nodeType, nodeValue, ownerDocument, parentNode, prefix, previousSibling, tagName

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.

[edit] Methods

Inherited from XUL element
blur, click, doCommand, focus, getElementsByAttribute

Inherited from DOM element
addEventListener, appendChild, dispatchEvent, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, hasAttribute, hasAttributeNS, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, removeEventListener, replaceChild, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS

close
Return type: none
Closes the notification and removes it from its enclosing notificationbox.

[edit] Related

Elements
notificationbox