web-wiki/resources/mediawiki/mediawiki.js
/**
			 * Adds a dependencies to the queue with optional callbacks to be run
			 * when the dependencies are ready or fail
			 *
			 * @param dependencies string module name or array of string module names
			 * @param ready function callback to execute when all dependencies are ready
			 * @param error function callback to execute when any dependency fails
			 * @param async (optional) If true, load modules asynchronously even if
			 *  document ready has not yet occurred
			 */
Adds a dependencies to the queue with optional callbacks to be run
when the dependencies are ready or fail

@param dependencies string module name or array of string module names
@param ready function callback to execute when all dependencies are ready
@param error function callback to execute when any dependency fails
@param async (optional) If true, load modules asynchronously even if
document ready has not yet occurred
Adds a dependencies to the queue with optional callbacks to be run when the dependencies are ready or fail @param dependencies string module name or array of string module names @param ready function callback to execute when all dependencies are ready @param error function callback to execute when any dependency fails @param async ( optional ) If true load modules asynchronously even if document ready has not yet occurred
function request( dependencies, ready, error, async ) {
				var regItemDeps, regItemDepLen, n;
				if ( typeof dependencies === 'string' ) {
					dependencies = [dependencies];
					if ( registry[dependencies[0]] !== undefined ) {
						regItemDeps = registry[dependencies[0]].dependencies;
						regItemDepLen = regItemDeps.length;
						for ( n = 0; n < regItemDepLen; n += 1 ) {
							dependencies[dependencies.length] = regItemDeps[n];
						}
					}
				}
				if ( arguments.length > 1 ) {
					jobs[jobs.length] = {
						'dependencies': filter(
							['registered', 'loading', 'loaded'],
							dependencies
						),
						'ready': ready,
						'error': error
					};
				}
				dependencies = filter( ['registered'], dependencies );
				for ( n = 0; n < dependencies.length; n += 1 ) {
					if ( $.inArray( dependencies[n], queue ) === -1 ) {
						queue[queue.length] = dependencies[n];
						if ( async ) {
							registry[dependencies[n]].async = true;
						}
					}
				}
				mw.loader.work();
			}
function request ( dependencies , ready , error , async ) { var regItemDeps , regItemDepLen , n ; if ( typeof dependencies === 'string' ) { dependencies = [ dependencies ] ; if ( registry [ dependencies [ 0 ] ] !== undefined ) { regItemDeps = registry [ dependencies [ 0 ] ] . dependencies ; regItemDepLen = regItemDeps . length ; for ( n = 0 ; n < regItemDepLen ; n += 1 ) { dependencies [ dependencies . length ] = regItemDeps [ n ] ; } } } if ( arguments . length > 1 ) { jobs [ jobs . length ] = { 'dependencies' : filter ( [ 'registered' , 'loading' , 'loaded' ] , dependencies ) , 'ready' : ready , 'error' : error } ; } dependencies = filter ( [ 'registered' ] , dependencies ) ; for ( n = 0 ; n < dependencies . length ; n += 1 ) { if ( $ . inArray ( dependencies [ n ] , queue ) === - 1 ) { queue [ queue . length ] = dependencies [ n ] ; if ( async ) { registry [ dependencies [ n ] ] . async = true ; } } } mw . loader . work ( ) ; }
Adds a dependencies to the queue with optional callbacks to be run
 when the dependencies are ready or fail
Adds a dependencies to the queue with optional callbacks to be run when the dependencies are ready or fail
// Allow calling by single module name
 // Cache repetitively accessed deep level object member
 // Cache to avoid looped access to length property
 // Add ready and error callbacks if they were given
 // Queue up any dependencies that are registered
 // Mark this module as async in the registry
 // Work the queue
