| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
ve.ui.ActionFactory = function VeUiActionFactory() { |
| 15 |
|
| 16 |
OO.Factory.call( this ); |
| 17 |
}; |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
OO.inheritClass( ve.ui.ActionFactory, OO.Factory ); |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
ve.ui.ActionFactory.prototype.doesActionSupportMethod = function ( action, method ) { |
| 33 |
if ( Object.prototype.hasOwnProperty.call( this.registry, action ) ) { |
| 34 |
return this.registry[ action ].static.methods.indexOf( method ) !== -1; |
| 35 |
} |
| 36 |
throw new Error( 'Unknown action: ' + action ); |
| 37 |
}; |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
ve.ui.actionFactory = new ve.ui.ActionFactory(); |