mediawiki-extensions-Visual.../modules/ve/ce/ve.ce.LeafNode.js
Trevor Parscal 02b0c7a6f4 Made extendClass accept a variadic list of base classes to extend with
Change-Id: I6d2307ce39da47ad2673dd439789a2f74632c59f
2012-06-22 10:50:41 -07:00

27 lines
632 B
JavaScript

/**
* ContentEditable node that can not have any children.
*
* @class
* @abstract
* @constructor
* @extends {ve.LeafNode}
* @extends {ve.ce.Node}
* @param {String} type Symbolic name of node type
* @param model {ve.dm.LeafNode} Model to observe
* @param {jQuery} [$element] Element to use as a container
*/
ve.ce.LeafNode = function( type, model, $element ) {
// Inheritance
ve.LeafNode.call( this );
ve.ce.Node.call( this, type, model, $element );
// DOM Changes
if ( model.isWrapped() ) {
this.$.addClass( 've-ce-leafNode' );
}
};
/* Inheritance */
ve.extendClass( ve.ce.LeafNode, ve.LeafNode, ve.ce.Node );