Debian Codegraph @

extensions/VisualEditor/lib/ve/src/dm/nodes/ve.dm.DefinitionListNode.js

raw symbols SCIP
1 /*!
2 * VisualEditor DataModel DefinitionListNode class.
3 *
4 * @copyright See AUTHORS.txt
5 */
6
7 /**
8 * DataModel definition list node.
9 *
10 * @class
11 * @extends ve.dm.BranchNode
12 *
13 * @constructor
14 * @param {Object} [element] Reference to element in linear model
15 * @param {ve.dm.Node[]} [children]
16 */
17 ve.dm.DefinitionListNode = function VeDmDefinitionListNode() {
18 // Parent constructor
19 ve.dm.DefinitionListNode.super.apply( this, arguments );
20 };
21
22 /* Inheritance */
23
24 OO.inheritClass( ve.dm.DefinitionListNode, ve.dm.BranchNode );
25
26 /* Static Properties */
27
28 ve.dm.DefinitionListNode.static.name = 'definitionList';
29
30 ve.dm.DefinitionListNode.static.childNodeTypes = [ 'definitionListItem' ];
31
32 ve.dm.DefinitionListNode.static.matchTagNames = [ 'dl' ];
33
34 ve.dm.DefinitionListNode.static.isDiffedAsList = true;
35
36 // Nodes which are diffed as a list must have the same description logic as each other
37 ve.dm.DefinitionListNode.static.describeChanges = function () {
38 return ve.dm.ListNode.static.describeChanges.apply( this, arguments );
39 };
40
41 ve.dm.DefinitionListNode.static.describeChange = function () {
42 return ve.dm.ListNode.static.describeChange.apply( this, arguments );
43 };
44
45 /* Registration */
46
47 ve.dm.modelRegistry.register( ve.dm.DefinitionListNode );