Properties

actions

(non-null Array of {action: string, icon: (string or undefined), title: string} or undefined)

An array of notification actions representing the actions available to the user when the notification is presented

badge

(string or undefined)

URL of the image used to represent the notification when there is not enough space to display the notification itself.

body

(string or undefined)

Body text of the notification

data

(non-null Object or undefined)

Arbitrary data that you want associated with the notification. This can be of any data type.

dir

(string or undefined)

The direction in which to display the notification. Must be one of auto, ltr or rtl.

icon

(string or undefined)

URL to the notification icon.

image

(string or undefined)

URL of an image to be displayed in the notification.

lang

(string or undefined)

The notification's language as a BCP 47 language tag.

renotify

(boolean or undefined)

A boolean specifying whether the user should be notified after a new notification replaces an old one. Defaults to false.

requireInteraction

(boolean or undefined)

Indicates that a notification should remain active until the user clicks or dismisses it, rather than closing automatically. Defaults to false.

silent

(boolean or undefined)

A boolean specifying whether the notification should be silent. Defaults to false.

tag

(string or undefined)

An identifying tag for the notification.

timestamp

(number or undefined)

Timestamp of the notification. Refer to https://developer.mozilla.org/en-US/docs/Web/API/notification/timestamp for details.

title

(string or undefined)

Title text of the notification.

vibrate

(number, non-null Array of number, or undefined)

A vibration pattern for the device's vibration hardware to emit when the notification fires.