mozilla

Revision 63987 of appendNotification

  • Revision slug: XUL/Method/appendNotification
  • Revision title: appendNotification
  • Revision id: 63987
  • Created:
  • Creator: 2bass
  • Is current revision? No
  • Comment add description of buttons argument

Revision Content

{{template.XULRefMeth()}}
{{template.XULMeth2("appendNotification", "( label , value , image , priority , buttons )")}}
Return type: element
Create a new notification and display it. If another notification is already present with a higher priority, the new notification will be added behind it.
  • label - label to appear on the notification
  • value - value used to identify the notification
  • image - URL of image to appear on the notification
  • priority - notification priority, see Priority Levels.
  • buttons - array of button descriptions to appear on the notification.
Priority Levels :
  • 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 :
The buttons argument is an array of button descriptions. Each description is an object with the following properties:
  • accesskey - the accesskey to appear on the button
  • callback - function to be called when the button is activated. This function is passed two arguments:
    • the <notification> the button is associated with
    • the button description as passed to appendNotification.
  • label - the label to appear on the button
  • popup - the id of a popup for the button. If null, the button is a button popup.

Revision Source

<div class="noinclude">{{template.XULRefMeth()}}</div>
<dl><dt> {{template.XULMeth2("appendNotification", "( label , value , image , priority , buttons )")}}
</dt><dd> Return type: <i>element</i>
</dd><dd> Create a new notification and display it. If another notification is already present with a higher priority, the new notification will be added behind it.
</dd></dl>
<ul><li> label - label to appear on the notification
</li><li> value - value used to identify the notification
</li><li> image - URL of image to appear on the notification
</li><li> priority - notification priority, see Priority Levels.
</li><li> buttons - array of button descriptions to appear on the notification.
</li></ul>
<dl><dd><b>Priority Levels</b> :
</dd></dl>
<ul><li>PRIORITY_INFO_LOW
</li><li>PRIORITY_INFO_MEDIUM
</li><li>PRIORITY_INFO_HIGH
</li><li>PRIORITY_WARNING_LOW
</li><li>PRIORITY_WARNING_MEDIUM
</li><li>PRIORITY_WARNING_HIGH
</li><li>PRIORITY_CRITICAL_LOW
</li><li>PRIORITY_CRITICAL_MEDIUM
</li><li>PRIORITY_CRITICAL_HIGH
</li><li>PRIORITY_CRITICAL_BLOCK
</li></ul>
<dl><dd><b>Buttons</b> :
</dd></dl>
<dl><dd> The buttons argument is an array of button descriptions. Each description is an object with the following properties:
</dd></dl>
<ul><li> accesskey - the accesskey to appear on the button
</li><li> callback - function to be called when the button is activated. This function is passed two arguments:
<ul><li> the &lt;notification&gt; the button is associated with
</li><li> the button description as passed to appendNotification. 
</li></ul>
</li><li> label - the label to appear on the button
</li><li> popup - the id of a popup for the button. If null, the button is a button popup.
</li></ul>
Revert to this revision