Documentation for mw.uls.init

Bug: 50858
Change-Id: Iada465a8228955bf24f7a4628bf2288b3fe0c0ac
This commit is contained in:
Santhosh Thottingal
2013-07-07 17:25:58 +05:30
parent 3121b25d02
commit 0145529035

View File

@@ -217,17 +217,22 @@
} ).fail( function ( jqxhr, settings, exception ) { } ).fail( function ( jqxhr, settings, exception ) {
mw.log( 'Error in loading messages from ' + url + ' Exception: ' + exception ); mw.log( 'Error in loading messages from ' + url + ' Exception: ' + exception );
} ); } );
return deferred.promise(); return deferred.promise();
} }
}; };
/**
* Initialize ULS front-end and its i18n.
*
* @param {Function} callback callback function to be called after initialization.
*/
mw.uls.init = function ( callback ) { mw.uls.init = function ( callback ) {
var messageStore = new MWMessageStore(); var messageStore = new MWMessageStore();
callback = callback || $.noop; callback = callback || $.noop;
if ( initialized ) { if ( initialized ) {
callback.call( this, false ); callback.call( this );
return; return;
} }