2018-11-29 15:47:03 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor Initialization save error handler class
|
|
|
|
*
|
2023-12-01 16:06:11 +00:00
|
|
|
* @copyright See AUTHORS.txt
|
2018-11-29 15:47:03 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2018-12-05 21:37:13 +00:00
|
|
|
* Save error handler.
|
2018-11-29 15:47:03 +00:00
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @abstract
|
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
*/
|
|
|
|
ve.init.mw.SaveErrorHandler = function () {};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
OO.initClass( ve.init.mw.SaveErrorHandler );
|
|
|
|
|
|
|
|
/* Static methods */
|
|
|
|
|
|
|
|
/**
|
2018-12-05 21:37:13 +00:00
|
|
|
* Test if this handler should handle a specific API response
|
2018-11-29 15:47:03 +00:00
|
|
|
*
|
|
|
|
* @static
|
|
|
|
* @inheritable
|
2018-12-07 19:17:16 +00:00
|
|
|
* @param {Object} data API response from action=visualeditoredit
|
2018-11-29 15:47:03 +00:00
|
|
|
* @return {boolean}
|
|
|
|
*/
|
|
|
|
ve.init.mw.SaveErrorHandler.static.matchFunction = null;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Process the save error
|
|
|
|
*
|
|
|
|
* @static
|
|
|
|
* @inheritable
|
2018-12-07 19:17:16 +00:00
|
|
|
* @param {Object} data API response from action=visualeditoredit
|
2021-06-04 11:58:18 +00:00
|
|
|
* @param {ve.init.mw.ArticleTarget} target
|
2018-11-29 15:47:03 +00:00
|
|
|
*/
|
|
|
|
ve.init.mw.SaveErrorHandler.static.process = null;
|
2018-12-04 22:55:35 +00:00
|
|
|
|
|
|
|
/* Save error registry */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Extensions can add SaveErrorHandler sub-classes to this registry.
|
|
|
|
*/
|
|
|
|
ve.init.mw.saveErrorHandlerFactory = new OO.Factory();
|