Merge "selenium: invoke jobs to enforce eventual consistency"
[lhc/web/wiklou.git] / resources / src / mediawiki.notify.js
1 /**
2 * @class mw.plugin.notify
3 */
4 ( function () {
5 'use strict';
6
7 /**
8 * @see mw.notification#notify
9 * @see mw.notification#defaults
10 * @param {HTMLElement|HTMLElement[]|jQuery|mw.Message|string} message
11 * @param {Object} options See mw.notification#defaults for details.
12 * @return {jQuery.Promise}
13 */
14 mw.notify = function ( message, options ) {
15 // Don't bother loading the whole notification system if we never use it.
16 return mw.loader.using( 'mediawiki.notification' )
17 .then( function () {
18 // Call notify with the notification the user requested of us.
19 return mw.notification.notify( message, options );
20 } );
21 };
22
23 /**
24 * @class mw
25 * @mixins mw.plugin.notify
26 */
27
28 }() );