extensions/VisualEditor/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionTableCellNode.js
raw symbols SCIP| 1 | /*! |
| 2 | * VisualEditor ContentEditable MWTransclusionTableCellNode class. |
| 3 | * |
| 4 | * @copyright See AUTHORS.txt |
| 5 | * @license The MIT License (MIT); see LICENSE.txt |
| 6 | */ |
| 7 | |
| 8 | /** |
| 9 | * ContentEditable MediaWiki transclusion table cell node. |
| 10 | * |
| 11 | * @class |
| 12 | * @extends ve.ce.MWTransclusionNode |
| 13 | * @constructor |
| 14 | * @mixes ve.ce.TableCellableNode |
| 15 | * @param {ve.dm.MWTransclusionTableCellNode} model Model to observe |
| 16 | */ |
| 17 | ve.ce.MWTransclusionTableCellNode = function VeCeMWTransclusionTableCellNode( model ) { |
| 18 | // Parent constructor |
| 19 | ve.ce.MWTransclusionTableCellNode.super.call( this, model ); |
| 20 | |
| 21 | // Mixin constructors |
| 22 | ve.ce.TableCellableNode.call( this ); |
| 23 | }; |
| 24 | |
| 25 | /* Inheritance */ |
| 26 | |
| 27 | OO.inheritClass( ve.ce.MWTransclusionTableCellNode, ve.ce.MWTransclusionNode ); |
| 28 | |
| 29 | OO.mixinClass( ve.ce.MWTransclusionTableCellNode, ve.ce.TableCellableNode ); |
| 30 | |
| 31 | /* Static Properties */ |
| 32 | |
| 33 | ve.ce.MWTransclusionTableCellNode.static.name = 'mwTransclusionTableCell'; |
| 34 | |
| 35 | /* Methods */ |
| 36 | |
| 37 | ve.ce.MWTransclusionTableCellNode.prototype.getTagName = function () { |
| 38 | // mwTransclusionTableCells have no style attribute. Give them a table |
| 39 | // cell to start with, although it will get overwritten with |
| 40 | // originalDomElements. |
| 41 | return 'td'; |
| 42 | }; |
| 43 | |
| 44 | /* Registration */ |
| 45 | |
| 46 | ve.ce.nodeFactory.register( ve.ce.MWTransclusionTableCellNode ); |