mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 14:56:20 +00:00
e0de881a8a
JSHint and various git tools complain about this, so let's just do away with them altogether Change-Id: I731866bd21f1ee0088fb0a71df3abf92692aca23
38 lines
661 B
JavaScript
38 lines
661 B
JavaScript
/**
|
|
* DataModel 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 */
|
|
|
|
/**
|
|
* Node rules.
|
|
*
|
|
* @see ve.dm.NodeFactory
|
|
* @static
|
|
* @member
|
|
*/
|
|
ve.dm.TextNode.rules = {
|
|
'canHaveChildren': false,
|
|
'canHaveGrandchildren': false,
|
|
'isWrapped': false,
|
|
'childNodeTypes': [],
|
|
'parentNodeTypes': null
|
|
};
|
|
|
|
/* Registration */
|
|
|
|
ve.dm.factory.register( 'text', ve.dm.TextNode );
|
|
|
|
/* Inheritance */
|
|
|
|
ve.extendClass( ve.dm.TextNode, ve.dm.LeafNode );
|