| 1 | /*! |
| 2 | * VisualEditor InternalListNode class. |
| 3 | * |
| 4 | * @copyright See AUTHORS.txt |
| 5 | */ |
| 6 | |
| 7 | /** |
| 8 | * ContentEditable internal list node. |
| 9 | * |
| 10 | * @class |
| 11 | * @extends ve.ce.BranchNode |
| 12 | * @constructor |
| 13 | * @param {ve.dm.InternalListNode} model Model to observe |
| 14 | * @param {Object} [config] Configuration options |
| 15 | */ |
| 16 | ve.ce.InternalListNode = function VeCeInternalListNode() { |
| 17 | // Parent constructor |
| 18 | ve.ce.InternalListNode.super.apply( this, arguments ); |
| 19 | |
| 20 | // An internal list has no rendering |
| 21 | this.$element = $( [] ); |
| 22 | }; |
| 23 | |
| 24 | /* Inheritance */ |
| 25 | |
| 26 | OO.inheritClass( ve.ce.InternalListNode, ve.ce.BranchNode ); |
| 27 | |
| 28 | /* Static Properties */ |
| 29 | |
| 30 | ve.ce.InternalListNode.static.name = 'internalList'; |
| 31 | |
| 32 | /* Methods */ |
| 33 | |
| 34 | /** |
| 35 | * Deliberately empty: don't build an entire CE tree with DOM elements for things that won't render |
| 36 | * |
| 37 | * @inheritdoc |
| 38 | */ |
| 39 | ve.ce.InternalListNode.prototype.onSplice = function () { |
| 40 | }; |
| 41 | |
| 42 | /* Registration */ |
| 43 | |
| 44 | ve.ce.nodeFactory.register( ve.ce.InternalListNode ); |