mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-16 10:59:56 +00:00
b7b2fc1179
Change-Id: Iee228d5f1a18a5c9618680fa81ab132a85472fa6
35 lines
816 B
JavaScript
35 lines
816 B
JavaScript
/**
|
|
* ContentEditable node that can not have any children.
|
|
*
|
|
* @class
|
|
* @abstract
|
|
* @constructor
|
|
* @extends {ve.LeafNode}
|
|
* @extends {ve.ce.Node}
|
|
* @param model {ve.dm.LeafNode} Model to observe
|
|
* @param {jQuery} [$element] Element to use as a container
|
|
*/
|
|
ve.ce.LeafNode = function( model, $element ) {
|
|
// Inheritance
|
|
ve.LeafNode.call( this );
|
|
ve.ce.Node.call( this, model, $element );
|
|
};
|
|
|
|
/* Abstract Methods */
|
|
|
|
/**
|
|
* Renders this node into this.$.
|
|
*
|
|
* @abstract
|
|
* @method
|
|
* @throws 've.ce.LeafNode.render not implemented in this subclass'
|
|
*/
|
|
ve.ce.LeafNode.prototype.render = function() {
|
|
throw 've.ce.LeafNode.render not implemented in this subclass: ' + this.constructor;
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
ve.extendClass( ve.ce.LeafNode, ve.LeafNode );
|
|
ve.extendClass( ve.ce.LeafNode, ve.ce.Node );
|