notifications

Singleton related to the notification (mw.notification) functionality. Only those notifications that need to be controlled collectively go through this object.

Source:

Methods

(static) add(message, optionsopt, dataopt) → {module:notifications~Notification}

Source:

Show a notificaition and add it to the registry. This is used to be able to keep track of shown notifications and close them all at once if needed. Most notifications are shown using simple mw.notify() or mw.notification.notify()).

Parameters:
Name Type Attributes Default Description
message string | external:Query

Message text.

options object <optional>
data object <optional>
{}

Additional data related to the notification.

Returns:
Type
module:notifications~Notification

(static) close(smoothopt)

Source:

Close all notifications added to the registry immediately.

Parameters:
Name Type Attributes Description
smooth boolean <optional>

Don't use a smooth animation.

(static) get() → {Array.<object>}

Source:

Get all notifications added to the registry (including already hidden). The module:notifications~Notification object will be in the notification property.

Returns:
Type
Array.<object>

(static) init()

Source:

Initialize the singleton.

Type Definitions

Notification

Source:
See:

Notification object created by running mw.notification.notify(...).

Type:
  • object