mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 23:05:35 +00:00
bf5ba1ea2b
Many of these problems were introduced in I859b5871a9d2f17d970c002067c8ff24f3513e9f Change-Id: Ifc2dc4934f782c4ce5107e3a356e357aef754083
33 lines
707 B
JavaScript
33 lines
707 B
JavaScript
/*!
|
|
* VisualEditor user interface Widget class.
|
|
*
|
|
* @copyright 2011-2012 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* Creates an ve.ui.Widget object.
|
|
*
|
|
* @class
|
|
* @abstract
|
|
* @extends ve.EventEmitter
|
|
* @constructor
|
|
* @param {Function} $$ jQuery for the frame the widget is in
|
|
* @param {jQuery} [$element] Widget element
|
|
*/
|
|
ve.ui.Widget = function VeUiWidget( $$, $element ) {
|
|
// Parent constructor
|
|
ve.EventEmitter.call( this );
|
|
|
|
// Properties
|
|
this.$$ = $$;
|
|
this.$ = $element || this.$$( '<div>' );
|
|
|
|
// Initialization
|
|
this.$.addClass( 've-ui-widget' );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
ve.inheritClass( ve.ui.Widget, ve.EventEmitter );
|