API
Functions
close()
Dismisses a notification that was shown to the user
Signature:
Parameters
Returns:
Promise<void>
create()
Creates a new Notification.
Signature:
Parameters
Returns:
Promise<Ref>
Identifier for the newly created Notification.
getActions()
Retrieves the actions of the notification.
Signature:
Parameters
Returns:
Promise<NotificationAction[]>
string.
getBody()
Retrieves the body of the notification.
Signature:
Parameters
Returns:
Promise<string>
string.
getCloseButtonText()
Retrieves the close button text of the notification.
Signature:
Parameters
Returns:
Promise<string>
string.
getHasReply()
Retrieves whether the notification has a reply action.
Signature:
Parameters
Returns:
Promise<boolean>
boolean.
getReplyPlaceholder()
Retrieves the reply placeholder of the notification.
Signature:
Parameters
Returns:
Promise<string>
string.
getSilent()
Retrieves whether the notification is silent.
Signature:
Parameters
Returns:
Promise<boolean>
boolean.
getSound()
Retrieves the sound of the notification.
Signature:
Parameters
Returns:
Promise<string>
string.
getSubtitle()
Retrieves the subtitle of the notification.
Signature:
Parameters
Returns:
Promise<string>
string.
getTimeoutType()
Retrieves the type of timeout duration for the notification. Can be "default" or "never". Linux and Windows only.
Signature:
Parameters
Returns:
Promise<string>
string.
getTitle()
Retrieves the title of the notification.
Signature:
Parameters
Returns:
Promise<string>
string.
getToastXml()
Retrieves the Toast XML of the notification.
Signature:
Parameters
Returns:
Promise<string>
string.
getUrgency()
Retrieves the urgency of the notification. Can be "normal", "critical", or "low". Linux only.
Signature:
Parameters
Returns:
Promise<string>
string.
show()
Shows a notification to the user
Signature:
Parameters
Returns:
Promise<void>
Variables
on
Subcribes to an event on a notification object.
Signature:
removeAllListeners
Unsubscribes all notification objects from the event name.
Signature:
Type Aliases
NotificationEvents
Signature: