9 * @class Roo.bootstrap.Element
10 * @extends Roo.bootstrap.Component
11 * Bootstrap Element class
12 * @cfg {String} html contents of the element
13 * @cfg {String} tag tag of the element
14 * @cfg {String} cls class of the element
15 * @cfg {Boolean} preventDefault (true|false) default false
16 * @cfg {Boolean} clickable (true|false) default false
17 * @cfg {String} role default blank - set to button to force cursor pointer
21 * Create a new Element
22 * @param {Object} config The config object
25 Roo.bootstrap.Element = function(config){
26 Roo.bootstrap.Element.superclass.constructor.call(this, config);
32 * When a element is chick
33 * @param {Roo.bootstrap.Element} this
34 * @param {Roo.EventObject} e
42 Roo.extend(Roo.bootstrap.Element, Roo.bootstrap.Component, {
47 preventDefault: false,
52 getAutoCreate : function(){
56 // cls: this.cls, double assign in parent class Component.js :: onRender
59 if (this.role !== false) {
66 initEvents: function()
68 Roo.bootstrap.Element.superclass.initEvents.call(this);
71 this.el.on('click', this.onClick, this);
79 if(this.preventDefault){
83 this.fireEvent('click', this, e); // why was this double click before?
93 return this.el.dom.innerHTML;
96 setValue : function(value)
98 this.el.dom.innerHTML = value;