Alien-Web-ExtJS-V3
view release on metacpan or search on metacpan
share/docs/source/Element.html view on Meta::CPAN
console.info(t.id); // 'p2'
},
this,
{
// filter the target element to be a descendant with the class 'clickable'
delegate: '.clickable'
}
);
* </code></pre></p>
* @return {Ext.Element} this
*/
addListener : function(eventName, fn, scope, options){
Ext.EventManager.on(this.dom, eventName, fn, scope || this, options);
return this;
},
<span id='Ext-Element-method-removeListener'> /**
</span> * Removes an event handler from this element. The shorthand version {@link #un} is equivalent.
* <b>Note</b>: if a <i>scope</i> was explicitly specified when {@link #addListener adding} the
* listener, the same scope must be specified here.
* Example:
* <pre><code>
el.removeListener('click', this.handlerFn);
// or
el.un('click', this.handlerFn);
</code></pre>
* @param {String} eventName The name of the event from which to remove the handler.
* @param {Function} fn The handler function to remove. <b>This must be a reference to the function passed into the {@link #addListener} call.</b>
* @param {Object} scope If a scope (<b><code>this</code></b> reference) was specified when the listener was added,
* then this must refer to the same object.
* @return {Ext.Element} this
*/
removeListener : function(eventName, fn, scope){
Ext.EventManager.removeListener(this.dom, eventName, fn, scope || this);
return this;
},
<span id='Ext-Element-method-removeAllListeners'> /**
</span> * Removes all previous added listeners from this element
* @return {Ext.Element} this
*/
removeAllListeners : function(){
Ext.EventManager.removeAll(this.dom);
return this;
},
<span id='Ext-Element-method-purgeAllListeners'> /**
</span> * Recursively removes all previous added listeners from this element and its children
* @return {Ext.Element} this
*/
purgeAllListeners : function() {
Ext.EventManager.purgeElement(this, true);
return this;
},
<span id='Ext-Element-method-addUnits'> /**
</span> * @private Test if size has a unit, otherwise appends the default
*/
addUnits : function(size){
if(size === "" || size == "auto" || size === undefined){
size = size || '';
} else if(!isNaN(size) || !unitPattern.test(size)){
size = size + (this.defaultUnit || 'px');
}
return size;
},
<span id='Ext-Element-method-load'> /**
</span> * <p>Updates the <a href="http://developer.mozilla.org/en/DOM/element.innerHTML">innerHTML</a> of this Element
* from a specified URL. Note that this is subject to the <a href="http://en.wikipedia.org/wiki/Same_origin_policy">Same Origin Policy</a></p>
* <p>Updating innerHTML of an element will <b>not</b> execute embedded <tt>&lt;script></tt> elements. This is a browser restriction.</p>
* @param {Mixed} options. Either a sring containing the URL from which to load the HTML, or an {@link Ext.Ajax#request} options object specifying
* exactly how to request the HTML.
* @return {Ext.Element} this
*/
load : function(url, params, cb){
Ext.Ajax.request(Ext.apply({
params: params,
url: url.url || url,
callback: cb,
el: this.dom,
indicatorText: url.indicatorText || ''
}, Ext.isObject(url) ? url : {}));
return this;
},
<span id='Ext-Element-method-isBorderBox'> /**
</span> * Tests various css rules/browsers to determine if this element uses a border box
* @return {Boolean}
*/
isBorderBox : function(){
return Ext.isBorderBox || Ext.isForcedBorderBox || noBoxAdjust[(this.dom.tagName || "").toLowerCase()];
},
<span id='Ext-Element-method-remove'> /**
</span> * <p>Removes this element's dom reference. Note that event and cache removal is handled at {@link Ext#removeNode}</p>
*/
remove : function(){
var me = this,
dom = me.dom;
if (dom) {
delete me.dom;
Ext.removeNode(dom);
}
},
<span id='Ext-Element-method-hover'> /**
</span> * Sets up event handlers to call the passed functions when the mouse is moved into and out of the Element.
* @param {Function} overFn The function to call when the mouse enters the Element.
* @param {Function} outFn The function to call when the mouse leaves the Element.
* @param {Object} scope (optional) The scope (<code>this</code> reference) in which the functions are executed. Defaults to the Element's DOM element.
* @param {Object} options (optional) Options for the listener. See {@link Ext.util.Observable#addListener the <tt>options</tt> parameter}.
* @return {Ext.Element} this
*/
hover : function(overFn, outFn, scope, options){
var me = this;
me.on('mouseenter', overFn, scope || me.dom, options);
me.on('mouseleave', outFn, scope || me.dom, options);
return me;
},
( run in 1.006 second using v1.01-cache-2.11-cpan-787462296c9 )