mediawiki-extensions-Visual.../modules/ve/dm/nodes/ve.dm.DocumentNode.js
Catrope 51f4b4be54 Convert node rules to static properties
Change-Id: If7d0159e984d9ccb4d5c31effb62bb9612260fda
2013-01-18 14:51:40 -08:00

38 lines
851 B
JavaScript

/*!
* VisualEditor DataModel DocumentNode class.
*
* @copyright 2011-2012 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* DataModel document node.
*
* @class
* @extends ve.dm.BranchNode
* @constructor
* @param {ve.dm.BranchNode[]} [children] Child nodes to attach
*/
ve.dm.DocumentNode = function VeDmDocumentNode( children ) {
// Parent constructor
ve.dm.BranchNode.call( this, 'document', children );
};
/* Inheritance */
ve.inheritClass( ve.dm.DocumentNode, ve.dm.BranchNode );
/* Static Properties */
ve.dm.DocumentNode.static.name = 'document';
ve.dm.DocumentNode.static.isWrapped = false;
ve.dm.DocumentNode.static.parentNodeTypes = [];
ve.dm.DocumentNode.static.matchTagNames = [];
/* Registration */
ve.dm.nodeFactory.register( 'document', ve.dm.DocumentNode );