Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7495300
ve.ui.ActionFactory.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
904 B
Referenced Files
None
Subscribers
None
ve.ui.ActionFactory.js
View Options
/*!
* 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
Details
Attached
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)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment