Static
LIFETIME_Notification lifetime in milliseconds.
Static
MAX_The maximum number of active notifications.
Clear all notifications.
Display a notification with the "error" type.
The content of the error message
Optional
options: NotificationOptionsNotification options passed to the notify function
The registered notification
Does the notification linked to the ID exist?.
The Notification or ID to remove
Display a notification with the "info" type.
The content of the info message
Optional
options: NotificationOptionsNotification options passed to the notify function
The registered notification
Push a new notification into the queue
The content of the notification message. A passed object should have a
meaningful override of the toString
method. If the object is an
Error
and console logging is requested, the stack trace will be
included.
The type of notification, "info", "warning", and "error" are supported
Optional
options: NotificationOptions = {}Additional options which affect the notification
The registered notification
Remove the notification linked to the ID.
The Notification or ID to remove
Display a notification with the "success" type.
The content of the success message
Optional
options: NotificationOptionsNotification options passed to the notify function
The registered notification
Update the progress of the notification.
A Notification or ID to update
Optional
update: {An incremental progress update
Optional
clean?: stringOptional
escape?: stringOptional
format?: Record<string, string>A mapping of formatting strings passed to Localization#format
Optional
localize?: stringLocalize updates to presented progress text
Optional
message?: stringAn update to the string message
Optional
pct?: numberAn update to the completion percentage
Display a notification with the "warning" type.
The content of the warning message
Optional
options: NotificationOptionsNotification options passed to the notify function
The registered notification
A common framework for displaying notifications to the client. Submitted notifications are added to a queue, and up to Notifications.MAX_ACTIVE notifications are displayed at once. Each notification is displayed for Notifications.LIFETIME_MS milliseconds before being removed, at which point further notifications are pulled from the queue.
Example: Displaying Notification Messages
Example: Progress Bar Notification