Class: Notification

Notification

new Notification()

Defines actions of the notifications.
Source:

Methods

addAction(callback)

Add a callback that will be call when the user click on the notification.
Parameters:
Name Type Description
callback object The callback that will be executed when the user will interact with the notification.
Source:

addActionButton(label, callback)

Add a button to the notification. It is possible to add an emoji in the label. The surrogates unicode must be passed because of the javascript engine version used. (https://mathiasbynens.be/notes/javascript-unicode) The unicode format must be in the form used by Java ("\\uXXXX"). For example the usual unicode "\\u1F44D" must be "\\uD83D\\uDC4D"
Parameters:
Name Type Description
label string The label that will be printed in the button.
callback object The callback that will be executed when the user will interact with the notification.
Source:

discard()

Discard the notification.
Source:

show()

Show the notification to the user.
Source: