Bubble notifications/ja



Bubble notifications is a JavaScript system developed as part of MediaWiki for displaying notifications on a web page.

機能

 * 複数の通知: 同時に多数の通知を表示できます. それぞれ個別に閉じることが可能です.
 * 自動的に閉じる: 通知は、しばらくすると自動で閉じる様設定ができます. This is enabled by default, but individual features using this system may choose to disable it for specific notifications where needed.
 * タグ付け: A notification can optionally be given a name (or "tag"). When a new notification is created with the same name as an older one that is still active, the older one is replaced with the new one. This enables an improved user experience where one would otherwise cause old, incomplete, or duplicate notifications to be visible (example use cases)

API
バブル通知におけるエントリーポイントは、 メソッドです. 例:

The format is:, available options are:


 * – A boolean indicating whether the notification should automatically be hidden after shown or if it should persist.
 * – Number of seconds for timeout of auto-hide notifications.
 * – 任意の文字列です. 通知にタグを付けるとそのタグの付いたメッセージが1つだけ表示されます.  Trying to display a new notification with the same tag as one already being displayed will cause the other notification to be closed and this new notification to open up inside the same place as the previous notification.
 * – 通知の任意のタイトル. コンテンツの上に表示され、普通は太字の表示です.
 * – スタイリング用のメッセージタイプを示す任意の文字列. 例: "info", "warn", "error"
 * – autoHideタイムアウトを、ページの表示時間に基づくのか、それとも時計の時間に基づくのかを示すブール値.

関連項目

 * API の説明文書: mw.notify