mw.Target: Allow passing storageExpiry to initAutosave

Change-Id: Idcf50a527e2386122d077c497477057657824646
Depends-On: I4557a8808145fd1a601fe9b3fa1b190f8dba0077
This commit is contained in:
Ed Sanders 2022-09-01 23:31:14 +01:00 committed by Bartosz Dziewoński
parent 2df8a95ac3
commit 24a89caf93

View file

@ -428,6 +428,7 @@ ve.init.mw.Target.prototype.setSurface = function ( surface ) {
* @cfg {boolean} [suppressNotification=false] Don't notify the user if changes are recovered
* @cfg {string} [docId] Document ID for storage grouping
* @cfg {ve.init.SafeStorage} [storage] Storage interface
* @cfg {number} [storageExpiry] Storage expiry time in seconds (optional)
*/
ve.init.mw.Target.prototype.initAutosave = function ( config ) {
var target = this;
@ -447,7 +448,7 @@ ve.init.mw.Target.prototype.initAutosave = function ( config ) {
}
if ( config.storage ) {
surfaceModel.setStorage( config.storage );
surfaceModel.setStorage( config.storage, config.storageExpiry );
}
if ( this.recovered ) {