Class ContainerNotificationAbstract

Hierarchy

  • ContainerNotification

Constructors

Properties

onclick: any

A handler for the click event. It is triggered each time the user clicks the notification.

onerror: any

A handler for the error event. It is triggered each the the notification encounters an error.

Notification options.

title: string

Defines a title for the notification. Depending on container and choice of notification mechanism, this might not be shown.

permission: NotificationPermission = "granted"

A string representing the current permission to display notifications.

Methods

  • Requests permission from the user to display notifications.

    Returns

    A Promise that resolves to the permission picked by the user.

    Parameters

    • Optional callback: NotificationPermissionCallback

      An optional callback function that is called with the permission value. Depcrecated in favor of the promise return value

    Returns Promise<string>