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.
     * &lt;b&gt;Note&lt;/b&gt;: if a &lt;i&gt;scope&lt;/i&gt; was explicitly specified when {@link #addListener adding} the
     * listener, the same scope must be specified here.
     * Example:
     * &lt;pre&gt;&lt;code&gt;
el.removeListener('click', this.handlerFn);
// or
el.un('click', this.handlerFn);
&lt;/code&gt;&lt;/pre&gt;
     * @param {String} eventName The name of the event from which to remove the handler.
     * @param {Function} fn The handler function to remove. &lt;b&gt;This must be a reference to the function passed into the {@link #addListener} call.&lt;/b&gt;
     * @param {Object} scope If a scope (&lt;b&gt;&lt;code&gt;this&lt;/code&gt;&lt;/b&gt; 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 === &quot;&quot; || size == &quot;auto&quot; || 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>     * &lt;p&gt;Updates the &lt;a href=&quot;http://developer.mozilla.org/en/DOM/element.innerHTML&quot;&gt;innerHTML&lt;/a&gt; of this Element
     * from a specified URL. Note that this is subject to the &lt;a href=&quot;http://en.wikipedia.org/wiki/Same_origin_policy&quot;&gt;Same Origin Policy&lt;/a&gt;&lt;/p&gt;
     * &lt;p&gt;Updating innerHTML of an element will &lt;b&gt;not&lt;/b&gt; execute embedded &lt;tt&gt;&amp;lt;script&gt;&lt;/tt&gt; elements. This is a browser restriction.&lt;/p&gt;
     * @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 || &quot;&quot;).toLowerCase()];
    },

<span id='Ext-Element-method-remove'>    /**
</span>     * &lt;p&gt;Removes this element's dom reference.  Note that event and cache removal is handled at {@link Ext#removeNode}&lt;/p&gt;
     */
    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 (&lt;code&gt;this&lt;/code&gt; 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 &lt;tt&gt;options&lt;/tt&gt; 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 )