Page MenuHomeWickedGov Phorge

ve.ui.ActionFactory.js
No OneTemporary

Size
904 B
Referenced Files
None
Subscribers
None

ve.ui.ActionFactory.js

/*!
* VisualEditor UserInterface ActionFactory class.
*
* @copyright See AUTHORS.txt
*/
/**
* Action factory.
*
* @class
* @extends OO.Factory
* @constructor
*/
ve.ui.ActionFactory = function VeUiActionFactory() {
// Parent constructor
OO.Factory.call( this );
};
/* Inheritance */
OO.inheritClass( ve.ui.ActionFactory, OO.Factory );
/* Methods */
/**
* Check if an action supports a method.
*
* @param {string} action Name of action
* @param {string} method Name of method
* @return {boolean} The action supports the method
*/
ve.ui.ActionFactory.prototype.doesActionSupportMethod = function ( action, method ) {
if ( Object.prototype.hasOwnProperty.call( this.registry, action ) ) {
return this.registry[ action ].static.methods.includes( method );
}
throw new Error( 'Unknown action: ' + action );
};
/* Initialization */
ve.ui.actionFactory = new ve.ui.ActionFactory();

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 23, 21:46 (6 d, 14 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
30/3c/a9fb3bad2b496775d336cb3aea27
Default Alt Text
ve.ui.ActionFactory.js (904 B)

Event Timeline