mediawiki-extensions-Visual.../modules/ve2/ce/ve.ce.NodeFactory.js
Trevor Parscal e0de881a8a Removed trailing whitespace in multi-line comment blocks
JSHint and various git tools complain about this, so let's just do away with them altogether

Change-Id: I731866bd21f1ee0088fb0a71df3abf92692aca23
2012-05-14 15:05:09 -07:00

36 lines
695 B
JavaScript

/**
* ContentEditable node factory.
*
* @class
* @extends {ve.NodeFactory}
* @constructor
*/
ve.ce.NodeFactory = function() {
// Inheritance
ve.NodeFactory.call( this );
};
/* Methods */
/**
* Checks if a given node type can be split.
*
* @param {String} type Node type
* @returns {Boolean} The node can have grandchildren
* @throws 'Unknown node type'
*/
ve.ce.NodeFactory.prototype.canNodeBeSplit = function( type ) {
if ( type in this.registry ) {
return this.registry[type].rules.canBeSplit;
}
throw 'Unknown node type: ' + type;
};
/* Inheritance */
ve.extendClass( ve.ce.NodeFactory, ve.NodeFactory );
/* Initialization */
ve.ce.factory = new ve.ce.NodeFactory();