mediawiki-extensions-Visual.../modules/ve/init/mw
Roan Kattouw f538fcf6be mw.ViewPageTarget: Add sanity check for DOM roundtrip
The sanity check converts the linear model back to DOM, then
compares this DOM to the original DOM and rejects the deferred
if they are not equal.

The DOM creation has to be done synchronously (before we unlock
the surface), but the actual comparsion can be (and is) done
asynchronously.

To make the UI flow of the save dialog easier we just keep the
save button on the toolbar itself disabled until the sanity
check is done. Though this should finish before the user starts
editing the document (let alone start saving), we do add a class
to the button to indicate a progress cursor.

To simulate a slow sanity check, set the setTimeout in
startSanityCheck to 5000, load VE, make a change, hover the
button, and see it change from disabled + progress-cursor to
enabled after 5 seconds.

To simulate the sanity check failing, change !== to === in
the first "if" in startSanityCheck.

Bug: 47521
Bug: 50067
Change-Id: I04f71fe8e00c6257fbc953cc9de3323e24709b0f
2013-06-27 19:20:14 -07:00
..
styles mw.ViewPageTarget: Add sanity check for DOM roundtrip 2013-06-27 19:20:14 -07:00
targets mw.ViewPageTarget: Add sanity check for DOM roundtrip 2013-06-27 19:20:14 -07:00
ve.init.mw.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.init.mw.Platform.js Image insertion 2013-06-06 17:36:55 -07:00
ve.init.mw.splitTest.js Address Krinkle's review comments from I51c441d61 2013-06-17 19:04:27 -07:00
ve.init.mw.Target.js mw.ViewPageTarget: Add sanity check for DOM roundtrip 2013-06-27 19:20:14 -07:00