All files / src/dm/nodes ve.dm.InternalItemNode.js

85.71% Statements 12/14
100% Branches 0/0
33.33% Functions 1/3
85.71% Lines 12/14

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59                                1x   44x         1x       1x   1x   1x   1x   1x   1x             1x             1x           1x  
/*!
 * VisualEditor DataModel InternalItemNode class.
 *
 * @copyright 2011-2020 VisualEditor Team and others; see http://ve.mit-license.org
 */
 
/**
 * DataModel internal item node.
 *
 * @class
 * @extends ve.dm.BranchNode
 *
 * @constructor
 * @param {Object} [element] Reference to element in linear model
 * @param {ve.dm.Node[]} [children]
 */
ve.dm.InternalItemNode = function VeDmInternalItemNode() {
	// Parent constructor
	ve.dm.InternalItemNode.super.apply( this, arguments );
};
 
/* Inheritance */
 
OO.inheritClass( ve.dm.InternalItemNode, ve.dm.BranchNode );
 
/* Static members */
 
ve.dm.InternalItemNode.static.name = 'internalItem';
 
ve.dm.InternalItemNode.static.matchTagNames = [];
 
ve.dm.InternalItemNode.static.ignoreChildren = true;
 
ve.dm.InternalItemNode.static.isInternal = true;
 
ve.dm.InternalItemNode.static.isDeletable = false;
 
ve.dm.InternalItemNode.static.parentNodeTypes = [ 'internalList' ];
 
/* Methods */
 
/**
 * @inheritdoc
 */
ve.dm.InternalItemNode.static.describeChanges = function () {
	return [];
};
 
/**
 * @inheritdoc
 */
ve.dm.InternalItemNode.static.getHashObject = function ( dataElement ) {
	return { type: dataElement.type };
};
 
/* Registration */
 
ve.dm.modelRegistry.register( ve.dm.InternalItemNode );