X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775:/docs/source/Element.html diff --git a/docs/source/Element.html b/docs/source/Element.html index 445f1f8e..2bb0d88e 100644 --- a/docs/source/Element.html +++ b/docs/source/Element.html @@ -1,11 +1,17 @@ - - - The source code - - - - -
/**
+
+
+  The source code
+    
+    
+
+
+    
/*!
+ * Ext JS Library 3.0.3
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/**
  * @class Ext.Element
  * 

Encapsulates a DOM element, adding simple DOM manipulation facilities, normalizing for browser differences.

*

All instances of this class inherit the methods of {@link Ext.Fx} making visual effects easily available to all DOM elements.

@@ -133,7 +139,7 @@ El.prototype = { } } if(o.style){ - Ext.DomHelper.applyStyles(el, o.style); + DH.applyStyles(el, o.style); } return this; }, @@ -146,6 +152,13 @@ El.prototype = { * @param {HtmlElement} t The target of the event. * @param {Object} o The options configuration passed to the {@link #addListener} call. */ +
/** + * @event contextmenu + * Fires when a right click is detected within the element. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */
/** * @event dblclick * Fires when a mouse double click is detected within the element. @@ -445,11 +458,11 @@ El.prototype = {
/** * Appends an event handler to this element. The shorthand version {@link #on} is equivalent. - * @param {String} eventName The type of event to handle + * @param {String} eventName The name of event to handle. * @param {Function} fn The handler function the event invokes. This function is passed * the following parameters: @@ -563,10 +576,10 @@ el.removeListener('click', this.handlerFn); // or el.un('click', this.handlerFn);
- * @param {String} eventName the type of event to remove - * @param {Function} fn the method the event invokes - * @param {Object} scope (optional) The scope (The this reference) of the handler function. Defaults - * to this Element. + * @param {String} eventName The name of the event from which to remove the handler. + * @param {Function} fn The handler function to remove. This must be a reference to the function passed into the {@link #addListener} call. + * @param {Object} scope If a scope (this 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){ @@ -630,16 +643,19 @@ el.un('click', this.handlerFn); dom = me.dom; me.removeAllListeners(); - delete El.cache[dom.id]; - delete El.dataCache[dom.id] - Ext.removeNode(dom); + if (dom) { + delete me.dom; + delete El.cache[dom.id]; + delete El.dataCache[dom.id]; + Ext.removeNode(dom); + } },
/** * 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 (this reference) in which the functions are executed. Defaults to the Element's DOM element. + * @param {Object} scope (optional) The scope (this 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 options parameter}. * @return {Ext.Element} this */ @@ -695,7 +711,9 @@ el.un('click', this.handlerFn); * @return {Ext.Element} this */ update : function(html) { - this.dom.innerHTML = html; + if (this.dom) { + this.dom.innerHTML = html; + } return this; } }; @@ -708,9 +726,9 @@ El.addMethods = function(o){
/** * Appends an event handler (shorthand for {@link #addListener}). - * @param {String} eventName The type of event to handle - * @param {Function} fn The handler function the event invokes - * @param {Object} scope (optional) The scope (this element) of the handler function + * @param {String} eventName The name of event to handle. + * @param {Function} fn The handler function the event invokes. + * @param {Object} scope (optional) The scope (this reference) in which the handler function is executed. * @param {Object} options (optional) An object containing standard {@link #addListener} options * @member Ext.Element * @method on @@ -719,10 +737,10 @@ ep.on = ep.addListener;
/** * Removes an event handler from this element (see {@link #removeListener} for additional notes). - * @param {String} eventName the type of event to remove - * @param {Function} fn the method the event invokes - * @param {Object} scope (optional) The scope (The this reference) of the handler function. Defaults - * to this Element. + * @param {String} eventName The name of the event from which to remove the handler. + * @param {Function} fn The handler function to remove. This must be a reference to the function passed into the {@link #addListener} call. + * @param {Object} scope If a scope (this reference) was specified when the listener was added, + * then this must refer to the same object. * @return {Ext.Element} this * @member Ext.Element * @method un @@ -815,7 +833,7 @@ El.data = function(el, key, value){ if(arguments.length == 2){ return c[key]; }else{ - c[key] = value; + return (c[key] = value); } }; @@ -944,6 +962,6 @@ Ext.EventManager.on(window, 'unload', function(){ delete El._flyweights; }); })(); -
- + + \ No newline at end of file