mediawiki-extensions-Visual.../modules/ve-mw/init
Ed Sanders 76caef6b4b Use session storage to auto-save
Ensure we start with the same HTML (i.e. if an edit has
been made since the crash-recovery):
* Whenever an article target is activated, stash the initial
  document html, other parsoid response data, and the request
  parameters (pageName, mode, section) in session storage.
* Whenever an article is fetched through the target loader,
  recover from session storage if the request parameters match.

Store transactions:
* On document transaction (debounced) append the latest
  changes to session storage.
* If a document state is recovered from session storage,
  attempt to re-apply the stored transactions.

Clear transactions:
* Whenever the target is torn down (i.e. save, deliberately
  closing the editor to go back to read mode)

Other:
* If writing to session storage fails once, disable future
  attempts for that session (assume storage quota exceeded)
* Disable tempWikitextEditor when recovering. We don't have
  the transaction code loaded yet to perform the recovery.

Bug: T57370
Depends-On: I3832243fc347a99641fcb7e39a887a153c9a3b22
Depends-On: I448fb566fe9f7f5b5a76e88b70ca000e3d35b415
Change-Id: Id9d877f903cf4796a52f90991c030417a9f8786f
2018-02-27 12:19:06 +00:00
..
styles Drop IE10 support 2018-02-22 00:47:38 +00:00
targets Use session storage to auto-save 2018-02-27 12:19:06 +00:00
ve.init.mw.ApiResponseCache.js doc: Bump copyright year 2018-01-03 17:45:07 +00:00
ve.init.mw.ArticleTarget.js Use session storage to auto-save 2018-02-27 12:19:06 +00:00
ve.init.mw.ArticleTargetEvents.js doc: Bump copyright year 2018-01-03 17:45:07 +00:00
ve.init.mw.ArticleTargetLoader.js Use session storage to auto-save 2018-02-27 12:19:06 +00:00
ve.init.mw.DiffLoader.js doc: Bump copyright year 2018-01-03 17:45:07 +00:00
ve.init.mw.DiffPage.init.js DiffPage.init: Enforce a valid diff mode 2018-02-22 11:48:37 -06:00
ve.init.mw.GalleryImageInfoCache.js doc: Bump copyright year 2018-01-03 17:45:07 +00:00
ve.init.mw.ImageInfoCache.js doc: Bump copyright year 2018-01-03 17:45:07 +00:00
ve.init.mw.js doc: Bump copyright year 2018-01-03 17:45:07 +00:00
ve.init.mw.LinkCache.js doc: Bump copyright year 2018-01-03 17:45:07 +00:00
ve.init.mw.Platform.init.js doc: Bump copyright year 2018-01-03 17:45:07 +00:00
ve.init.mw.Platform.js Use session storage to auto-save 2018-02-27 12:19:06 +00:00
ve.init.mw.Target.js doc: Bump copyright year 2018-01-03 17:45:07 +00:00
ve.init.mw.TempWikitextEditorWidget.js Follow-up 0a7a845a4: Missed one 2018-02-14 14:25:07 -08:00
ve.init.mw.trackSubscriber.js doc: Bump copyright year 2018-01-03 17:45:07 +00:00
ve.init.MWEditingTabDialog.js doc: Bump copyright year 2018-01-03 17:45:07 +00:00
ve.init.MWEditModeTool.js doc: Bump copyright year 2018-01-03 17:45:07 +00:00
ve.init.MWVESwitchConfirmDialog.js doc: Bump copyright year 2018-01-03 17:45:07 +00:00
ve.init.MWVESwitchPopupWidget.js doc: Bump copyright year 2018-01-03 17:45:07 +00:00
ve.init.MWWelcomeDialog.js doc: Bump copyright year 2018-01-03 17:45:07 +00:00