X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.base%2Fmediawiki.base.js;h=8a44dcc68638dafe4c633d1de90a88e46234e8e2;hb=a63c458127538ee6c6279602a436e3ba3abc0330;hp=16994f5bba0a5736dd9cdba7efee5224c7351b5a;hpb=66351c7f1bb0e402bcfe233a3fa94df55ffec007;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki.base/mediawiki.base.js b/resources/src/mediawiki.base/mediawiki.base.js index 16994f5bba..8a44dcc686 100644 --- a/resources/src/mediawiki.base/mediawiki.base.js +++ b/resources/src/mediawiki.base/mediawiki.base.js @@ -356,7 +356,7 @@ } ); }; - // Fire events from before track() triggred fire() + // Fire events from before track() triggered fire() trackCallbacks.fire( mw.trackQueue ); /** @@ -546,11 +546,11 @@ } else if ( contents instanceof this.Cdata ) { // CDATA if ( /<\/[a-zA-z]/.test( contents.value ) ) { - throw new Error( 'mw.html.element: Illegal end tag found in CDATA' ); + throw new Error( 'Illegal end tag found in CDATA' ); } s += contents.value; } else { - throw new Error( 'mw.html.element: Invalid type of contents' ); + throw new Error( 'Invalid type of contents' ); } } s += ''; @@ -641,12 +641,18 @@ mw.log.deprecate( window, '$j', $, 'Use $ or jQuery instead.' ); // Process callbacks for Grade A that require modules. - // Plain ones were already processed by startup.js. queue = window.RLQ; - // Redefine publicly to capture any late arrivals + // Replace temporary RLQ implementation from startup.js with the + // final implementation that also processes callbacks that can + // require modules. It must also support late arrivals of + // plain callbacks. (T208093) window.RLQ = { push: function ( entry ) { - mw.loader.using( entry[ 0 ], entry[ 1 ] ); + if ( typeof entry === 'function' ) { + entry(); + } else { + mw.loader.using( entry[ 0 ], entry[ 1 ] ); + } } }; while ( queue[ 0 ] ) {