mediawiki-extensions-Visual.../modules/ve2/dm/nodes/ve.dm.HeadingNode.js
Trevor Parscal 86591e5325 Restructured static node rules
Change-Id: I7023e1f334694d59767491f1010e7c4c59c0ce54
2012-05-21 17:39:12 -07:00

39 lines
779 B
JavaScript

/**
* DataModel node for a heading.
*
* @class
* @constructor
* @extends {ve.dm.BranchNode}
* @param {ve.dm.LeafNode[]} [children] Child nodes to attach
* @param {Object} [attributes] Reference to map of attribute key/value pairs
*/
ve.dm.HeadingNode = function( children, attributes ) {
// Inheritance
ve.dm.BranchNode.call( this, 'heading', children, attributes );
};
/* Static Members */
/**
* Node rules.
*
* @see ve.dm.NodeFactory
* @static
* @member
*/
ve.dm.HeadingNode.rules = {
'isWrapped': true,
'isContent': false,
'canContainContent': true,
'childNodeTypes': null,
'parentNodeTypes': null
};
/* Registration */
ve.dm.factory.register( 'heading', ve.dm.HeadingNode );
/* Inheritance */
ve.extendClass( ve.dm.HeadingNode, ve.dm.BranchNode );