DesktopArticleTarget: Make the waiting module list extensible

So that GlobalCssJs and other extensions can hook in.

Bug: T156899
Change-Id: I045c7b045ce28047298b28a05e77ef27749c1ee1
This commit is contained in:
David Lynch 2017-02-01 11:00:07 -06:00 committed by James D. Forrester
parent fc332c69e7
commit 217640624a
3 changed files with 7 additions and 3 deletions

View file

@ -699,6 +699,7 @@ class VisualEditorHooks {
$vars['wgVisualEditorConfig'] = [
'disableForAnons' => $veConfig->get( 'VisualEditorDisableForAnons' ),
'preloadModules' => $veConfig->get( 'VisualEditorPreloadModules' ),
'preferenceModules' => $veConfig->get( 'VisualEditorPreferenceModules' ),
'namespaces' => $availableNamespaces,
'contentModels' => $availableContentModels,

View file

@ -27,6 +27,10 @@
"VisualEditorPreferenceModules": {
"visualeditor-enable-experimental": "ext.visualEditor.experimental"
},
"VisualEditorPreloadModules": [
"site",
"user"
],
"VisualEditorRestbaseURL": false,
"VisualEditorFullRestbaseURL": false,
"VisualEditorFeedbackAPIURL": false,

View file

@ -127,10 +127,9 @@
targetPromise = mw.loader.using( 'ext.visualEditor.targetLoader' )
.then( function () {
mw.libs.ve.targetLoader.addPlugin( function () {
// If the user and site modules fail, we still want to continue
// Run VisualEditorPreloadModules, but if they fail, we still want to continue
// loading, so convert failure to success
return mw.loader.using( [ 'user', 'site' ] ).then(
return mw.loader.using( conf.preloadModules ).then(
null,
function () {
return $.Deferred().resolve();