mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
mw.Target: Allow passing storageExpiry to initAutosave
Change-Id: Idcf50a527e2386122d077c497477057657824646 Depends-On: I4557a8808145fd1a601fe9b3fa1b190f8dba0077
This commit is contained in:
parent
2df8a95ac3
commit
24a89caf93
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue