mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Move module pre-loading from DAT.init to ArticleTarget
This makes this feature available on Mobile as well. Change-Id: I26a2af63b3665f5563f8562f1a8e94287cad439f
This commit is contained in:
parent
c04e934361
commit
6459de6978
|
@ -275,11 +275,6 @@
|
|||
|
||||
targetPromise.then( function ( target ) {
|
||||
target.section = section;
|
||||
// Enqueue the loading of deferred modules (that is, modules which provide
|
||||
// functionality that is not needed for loading the editor).
|
||||
setTimeout( function () {
|
||||
mw.loader.load( 'easy-deflate.deflate' );
|
||||
}, 500 );
|
||||
} );
|
||||
|
||||
return targetPromise;
|
||||
|
|
|
@ -540,6 +540,12 @@ ve.init.mw.ArticleTarget.prototype.surfaceReady = function () {
|
|||
surfaceModel.startStoringChanges();
|
||||
// TODO: Listen to autosaveFailed event to notify user
|
||||
|
||||
// Start loading easy-deflate module in the background, so it's
|
||||
// already loaded when the save dialog is opened.
|
||||
setTimeout( function () {
|
||||
mw.loader.load( 'easy-deflate.deflate' );
|
||||
}, 500 );
|
||||
|
||||
// Parent method
|
||||
ve.init.mw.ArticleTarget.super.prototype.surfaceReady.apply( this, arguments );
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue