mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-18 03:41:45 +00:00
c2017f74b2
These don't add any knowledge but make the code harder to read and maintain, and are an additional source of errors. Change-Id: Ied57741a3f985e355adfddb4e75378d5c497faa9
49 lines
991 B
JavaScript
49 lines
991 B
JavaScript
/*!
|
|
* VisualEditor Initialization save error handler class
|
|
*
|
|
* @copyright 2011-2020 VisualEditor Team and others; see http://ve.mit-license.org
|
|
*/
|
|
|
|
/**
|
|
* Save error handler.
|
|
*
|
|
* @class
|
|
* @abstract
|
|
*
|
|
* @constructor
|
|
*/
|
|
ve.init.mw.SaveErrorHandler = function () {};
|
|
|
|
/* Inheritance */
|
|
|
|
OO.initClass( ve.init.mw.SaveErrorHandler );
|
|
|
|
/* Static methods */
|
|
|
|
/**
|
|
* Test if this handler should handle a specific API response
|
|
*
|
|
* @static
|
|
* @inheritable
|
|
* @param {Object} data API response from action=visualeditoredit
|
|
* @return {boolean}
|
|
*/
|
|
ve.init.mw.SaveErrorHandler.static.matchFunction = null;
|
|
|
|
/**
|
|
* Process the save error
|
|
*
|
|
* @static
|
|
* @inheritable
|
|
* @param {Object} data API response from action=visualeditoredit
|
|
* @param {ve.init.mw.ArticleTarget} target
|
|
*/
|
|
ve.init.mw.SaveErrorHandler.static.process = null;
|
|
|
|
/* Save error registry */
|
|
|
|
/*
|
|
* Extensions can add SaveErrorHandler sub-classes to this registry.
|
|
*/
|
|
ve.init.mw.saveErrorHandlerFactory = new OO.Factory();
|