Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BrowserNotification

Wrapper around the low-level notification namespace to make it easier to work with.

It takes an object-oriented approach i.e. the BrowserNotification.update/[[BrowserNotification.clear]] operations are methods on the instance.

see

BrowserNotification.create to create a new notification and wrap it with a BrowserNotification.

Hierarchy

  • BrowserNotification

Index

Constructors

constructor

Properties

id

id: string

Accessors

onButtonClicked$

onClicked$

onClosed$

Methods

update

  • update(options: NotificationOptions): Promise<boolean>

waitClosed

  • waitClosed(): Promise<void>

waitRemoved

  • waitRemoved(): Promise<void>
  • Wait until the notification is removed. This is different from BrowserNotification.waitClosed because it waits for the user to take action.

    On Windows for example the onClosed event is triggered when the notification goes off-screen, but it is still accessible in the notification area. The notification is only truly removed when the user takes some sort of action, either "closing" (clearing) the notification or pressing a button. It seems there is no way to detect the clearing of a notification so we only take the buttons into account.

    Returns Promise<void>

Static create

Generated using TypeDoc