Debian Codegraph @

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

raw symbols SCIP
1 /*!
2 * VisualEditor DataModel ListItemNode class.
3 *
4 * @copyright See AUTHORS.txt
5 */
6
7 /**
8 * DataModel list item 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.ListItemNode = function VeDmListItemNode() {
18 // Parent constructor
19 ve.dm.ListItemNode.super.apply( this, arguments );
20 };
21
22 /* Inheritance */
23
24 OO.inheritClass( ve.dm.ListItemNode, ve.dm.BranchNode );
25
26 /* Static Properties */
27
28 ve.dm.ListItemNode.static.name = 'listItem';
29
30 ve.dm.ListItemNode.static.parentNodeTypes = [ 'list' ];
31
32 ve.dm.ListItemNode.static.matchTagNames = [ 'li' ];
33
34 // Nodes which are diffed as a list must have the same description logic as each other
35 ve.dm.ListItemNode.static.describeChanges = function () {
36 return ve.dm.ListNode.static.describeChanges.apply( this, arguments );
37 };
38
39 ve.dm.ListItemNode.static.describeChange = function () {
40 return ve.dm.ListNode.static.describeChange.apply( this, arguments );
41 };
42
43 /* Registration */
44
45 ve.dm.modelRegistry.register( ve.dm.ListItemNode );