| Top |
Creates a notification with the associated title and body
params can contain values for 'body', 'icon', 'titleMarkup', 'bodyMarkup', and 'silent' parameters.
By default, the icon shown is created by calling source.createNotificationIcon(). However, if params contains an 'icon' parameter, the passed in icon will be shown.
If params contains a 'titleMarkup', or 'bodyMarkup' parameter with the value true, then the corresponding element is assumed to use pango markup. If the parameter is not present for an element, then anything that looks like markup in that element will appear literally in the output.
If params contains a 'silent' parameter with the value true, then the associated sound effects are suppressed. Note that notifications with an URGENT priority will always play a sound effect if there is one set.
update (string title,string body,object params);
Updates the notification timestamp, title, and body and regenerates the icon.
addButton (number id,string label);
Adds a button with the given label to the notification. All action buttons will appear in a single row at the bottom of the notification.
If the button is clicked, the notification will emit the action-invoked signal with id as a parameter.