Notification

open external class Notification(source)

Inheritors

Constructors

Link copied to clipboard
constructor(options: NotificationConstructorOptions = definedExternally)

Notification

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val actionEvent: <Error class: unknown class><<Error class: unknown class><Event<*>, Double>>
Link copied to clipboard
var actions: <Error class: unknown class><NotificationAction>

A NotificationAction[] property representing the actions of the notification.

Link copied to clipboard

A string property representing the body of the notification.

Link copied to clipboard
val clickEvent: <Error class: unknown class><<Error class: unknown class><Event<*>>>
Link copied to clipboard

A string property representing the close button text of the notification.

Link copied to clipboard
val closeEvent: <Error class: unknown class><<Error class: unknown class><Event<*>>>
Link copied to clipboard
val failedEvent: <Error class: unknown class><<Error class: unknown class><Event<*>, String>>
Link copied to clipboard

A boolean property representing whether the notification has a reply action.

Link copied to clipboard
val replyEvent: <Error class: unknown class><<Error class: unknown class><Event<*>, String>>
Link copied to clipboard

A string property representing the reply placeholder of the notification.

Link copied to clipboard
val showEvent: <Error class: unknown class><<Error class: unknown class><Event<*>>>
Link copied to clipboard

A boolean property representing whether the notification is silent.

Link copied to clipboard

A string property representing the sound of the notification.

Link copied to clipboard

A string property representing the subtitle of the notification.

Link copied to clipboard

A string property representing the type of timeout duration for the notification. Can be 'default' or 'never'.

Link copied to clipboard

A string property representing the title of the notification.

Link copied to clipboard

A string property representing the custom Toast XML of the notification.

Link copied to clipboard

A string property representing the urgency level of the notification. Can be 'normal', 'critical', or 'low'.

Functions

Link copied to clipboard
fun close()

Dismisses the notification.

Link copied to clipboard
fun show()

Immediately shows the notification to the user. Unlike the web notification API, instantiating a new Notification() does not immediately show it to the user. Instead, you need to call this method before the OS will display it.