mediawiki-extensions-Visual.../modules/es/models/es.PreModel.js

39 lines
762 B
JavaScript
Raw Normal View History

2011-11-10 11:51:42 +00:00
/**
* Creates an es.PreModel object.
*
* @class
* @constructor
* @extends {es.DocumentModelLeafNode}
* @param {Object} element Document data element of this node
* @param {Integer} length Length of document data element
*/
es.PreModel = function( element, length ) {
// Inheritance
es.DocumentModelLeafNode.call( this, 'pre', element, length );
};
/* Methods */
/**
* Creates a pre view for this model.
*
* @method
* @returns {es.PreView}
*/
es.PreModel.prototype.createView = function() {
return new es.PreView( this );
};
/* Registration */
es.DocumentModel.nodeModels.pre = es.PreModel;
es.DocumentModel.nodeRules.pre = {
'parents': null,
'children': []
2011-11-10 11:51:42 +00:00
};
/* Inheritance */
es.extendClass( es.PreModel, es.DocumentModelLeafNode );