Module: notifications

Classes

Notifications

Members

(static) notifications :module:notifications~Notifications

Regularly fetches notifications and decides which notification to show.

Type:
Source:

(inner, constant) DEFAULT_LOCALE :string

The default locale for the localization of notification texts.

Type:
  • string
Default Value:
  • en-US
Source:

Methods

(inner) getNumericalSeverity(notification) → {number}

Returns the numerical severity of a notification.

Parameters:
Name Type Description
notification Object

The notification.

Source:
Returns:

The numerical severity of the notification.

Type
number

(inner) localize(translations, locale) → {*}

Localizes a notification text.

Parameters:
Name Type Description
translations Object

The set of translations from which to select the localization.

locale string

The locale string to use for the selection. If no localized version is found in the translations object for the given locale, the default locale is used.

Source:
Returns:

The localized text; undefined if no localized version is found in the translations object.

Type
*

(inner) saveNotificationData(keyopt)

Saves notification data to preferences.

Parameters:
Name Type Attributes Default Description
key string <optional>
notificationdata

The key to save.

Source: