mediawiki-extensions-Visual.../modules/ve2/dm/nodes/ve.dm.TextNode.js
Trevor Parscal 44fe109f14 Added test data and fixed test suite links
Change-Id: Idb5de70b58c525a67f16b21f7adc53214af9b486
2012-04-27 14:59:52 -07:00

30 lines
568 B
JavaScript

/**
* Data model node for a document.
*
* @class
* @constructor
* @extends {ve.dm.LeafNode}
* @param {Integer} [length] Length of content data in document
*/
ve.dm.TextNode = function( length ) {
// Inheritance
ve.dm.LeafNode.call( this, 'text', length );
};
/* Static Members */
ve.dm.TextNode.rules = {
'canHaveChildren': false,
'canHaveGrandchildren': false,
'childNodeTypes': [],
'parentNodeTypes': null
};
/* Registration */
ve.dm.factory.register( 'text', ve.dm.TextNode );
/* Inheritance */
ve.extendClass( ve.dm.TextNode, ve.dm.LeafNode );