Merge "Improve sorting on SpecialWanted*-Pages"
[mediawiki.git] / resources / src / mediawiki / mediawiki.notify.js
blob0f3a08677452e019347a87fbc755bb82508e8684
1 /**
2 * @class mw.plugin.notify
3 */
4 ( function ( mw ) {
5 'use strict';
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}
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 } );
23 /**
24 * @class mw
25 * @mixins mw.plugin.notify
28 }( mediaWiki ) );