From 46cd3ed7a7c72c3788420d335d86e2dd150d9f18 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Fri, 2 Aug 2019 15:39:49 +0100 Subject: [PATCH] resourceloader: Move mw.libs and mw.widgets from startup to mediawiki.base These are not needed to help define mw.loader or to process RLQ, as such, it does not need to be in the critical path. This can instead download as part of mediawiki.base which loads concurrently with regular modules (but will execute first). Change-Id: I43f21706206aa7cb6fb779c68325623e07724125 --- resources/src/mediawiki.base/mediawiki.base.js | 12 ++++++++++++ resources/src/startup/mediawiki.js | 14 +------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/resources/src/mediawiki.base/mediawiki.base.js b/resources/src/mediawiki.base/mediawiki.base.js index 00a74fe468..4c8880cf7d 100644 --- a/resources/src/mediawiki.base/mediawiki.base.js +++ b/resources/src/mediawiki.base/mediawiki.base.js @@ -236,6 +236,18 @@ * @singleton */ + /** + * Empty object for third-party libraries, for cases where you don't + * want to add a new global, or the global is bad and needs containment + * or wrapping. + * + * @property + */ + mw.libs = {}; + + // OOUI widgets specific to MediaWiki + mw.widgets = {}; + /** * @inheritdoc mw.inspect#runReports * @method diff --git a/resources/src/startup/mediawiki.js b/resources/src/startup/mediawiki.js index ace92f0c8c..4ffe1029f9 100644 --- a/resources/src/startup/mediawiki.js +++ b/resources/src/startup/mediawiki.js @@ -434,15 +434,6 @@ */ config: new Map( $VARS.wgLegacyJavaScriptGlobals ), - /** - * Empty object for third-party libraries, for cases where you don't - * want to add a new global, or the global is bad and needs containment - * or wrapping. - * - * @property - */ - libs: {}, - /** * Store for messages. * @@ -2477,10 +2468,7 @@ * @property {mw.Map} */ tokens: new Map() - }, - - // OOUI widgets specific to MediaWiki - widgets: {} + } }; -- 2.20.1