Notification
Methods
destroy
notification.destroy()
Clears queues and toast state, unregisters shortcuts and focus scope, and removes the host from the DOM.
disablePlugin
notification.disablePlugin()
Hides all toasts, removes shortcuts and listeners, and destroys the UI host.
hideAll() must run before super.disablePlugin() because BasePlugin.disablePlugin() clears
this.enabled first, and hideAll() relies on the plugin still being enabled. The superclass
call then removes hooks and clears the shared EventManager.
enablePlugin
notification.enablePlugin()
Installs the notification host, document focusin listener (tab order + prior-focus for click paths), shortcuts
(F6 via grid + global shortcut contexts, Escape, Tab, Shift+Tab), and the focus scope.
getQueueSize
notification.getQueueSize() ⇒ number
Returns how many toasts are waiting in per-position queues.
hide
notification.hide(id)
Hides a toast by id.
| Param | Type | Description |
|---|---|---|
| id | string | Toast id returned from Notification#showMessage. |
hideAll
notification.hideAll()
Hides every visible toast and clears all per-position queues.
isEnabled
notification.isEnabled() ⇒ boolean
Returns whether the notification setting is enabled for this instance.
isVisible
notification.isVisible([id]) ⇒ boolean
Returns whether a toast is visible, or whether any toast is visible when id is omitted.
| Param | Type | Description |
|---|---|---|
| [id] | string | optional Toast id. |
showMessage
notification.showMessage(options) ⇒ string
Displays a toast. Returns the toast id, or an empty string when the toast is not shown.
Throws:
ErrorWhenoptionsis invalid or actions are malformed.
| Param | Type | Description |
|---|---|---|
| options | object | Toast options. |
| [options.variant] | 'info' 'success' 'warning' 'error' | optional Visual variant. |
| [options.title] | string | optional Optional title. |
| options.message | string HTMLElement | Main message body. |
| [options.duration] | number | optional Auto-dismiss delay in ms. 0 keeps the toast until dismissed manually. |
| [options.position] | 'top-start' 'top-end' 'bottom-start' 'bottom-end' | optional Corner stack. |
| [options.closable] | boolean | optional Whether the close control is shown. |
| [options.actions] | Array<NotificationActionSpec> | optional Action buttons. |
updatePlugin
notification.updatePlugin([newSettings])
Rebuilds the plugin after settings change when notification options actually change.
| Param | Type | Description |
|---|---|---|
| [newSettings] | object | optional Settings object passed to updateSettings (partial). |