X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..3789b528d8dd8aad4558e38e22d775bcab1cbd36:/docs/source/Element2.html diff --git a/docs/source/Element2.html b/docs/source/Element2.html index 94a12b10..c20cef3e 100644 --- a/docs/source/Element2.html +++ b/docs/source/Element2.html @@ -1,4 +1,21 @@ -Sencha Documentation Project
/**
+
+
+
+  
+  The source code
+  
+  
+  
+  
+
+
+  
/**
  * @class Ext.core.Element
  * <p>Encapsulates a DOM element, adding simple DOM manipulation facilities, normalizing for browser differences.</p>
  * <p>All instances of this class inherit the methods of {@link Ext.fx.Anim} making visual effects easily available to all DOM elements.</p>
@@ -86,13 +103,13 @@ if(opt.anim.isAnimated()){
             return EC[id].el;
         }
 
-        /**
+        /**
      * The DOM element
      * @type HTMLElement
      */
         this.dom = dom;
 
-        /**
+        /**
      * The DOM element ID
      * @type String
      */
@@ -104,7 +121,7 @@ if(opt.anim.isAnimated()){
 
 
     El.prototype = {
-        /**
+        /**
      * Sets the passed attributes as attributes of this element (a style attribute can be a string, object or function)
      * @param {Object} o The object with the attributes
      * @param {Boolean} useSet (optional) false to override the default setAttribute to use expandos.
@@ -134,70 +151,70 @@ if(opt.anim.isAnimated()){
         },
 
         //  Mouse events
-        /**
+        /**
      * @event click
      * Fires when a mouse 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 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.
      * @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 mousedown
      * Fires when a mousedown 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 mouseup
      * Fires when a mouseup 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 mouseover
      * Fires when a mouseover 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 mousemove
      * Fires when a mousemove is detected with 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 mouseout
      * Fires when a mouseout is detected with 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 mouseenter
      * Fires when the mouse enters 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 mouseleave
      * Fires when the mouse leaves the element.
      * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
@@ -206,21 +223,21 @@ if(opt.anim.isAnimated()){
      */
 
         //  Keyboard events
-        /**
+        /**
      * @event keypress
      * Fires when a keypress 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 keydown
      * Fires when a keydown 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 keyup
      * Fires when a keyup is detected within the element.
      * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
@@ -230,42 +247,42 @@ if(opt.anim.isAnimated()){
 
 
         //  HTML frame/object events
-        /**
+        /**
      * @event load
      * Fires when the user agent finishes loading all content within the element. Only supported by window, frames, objects and images.
      * @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 unload
      * Fires when the user agent removes all content from a window or frame. For elements, it fires when the target element or any of its content has been removed.
      * @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 abort
      * Fires when an object/image is stopped from loading before completely loaded.
      * @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 error
      * Fires when an object/image/frame cannot be loaded properly.
      * @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 resize
      * Fires when a document view is resized.
      * @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 scroll
      * Fires when a document view is scrolled.
      * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
@@ -274,42 +291,42 @@ if(opt.anim.isAnimated()){
      */
 
         //  Form events
-        /**
+        /**
      * @event select
      * Fires when a user selects some text in a text field, including input and textarea.
      * @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 change
      * Fires when a control loses the input focus and its value has been modified since gaining focus.
      * @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 submit
      * Fires when a form is submitted.
      * @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 reset
      * Fires when a form is reset.
      * @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 focus
      * Fires when an element receives focus either via the pointing device or by tab navigation.
      * @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 blur
      * Fires when an element loses focus either via the pointing device or by tabbing navigation.
      * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
@@ -318,21 +335,21 @@ if(opt.anim.isAnimated()){
      */
 
         //  User Interface events
-        /**
+        /**
      * @event DOMFocusIn
      * Where supported. Similar to HTML focus event, but can be applied to any focusable 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 DOMFocusOut
      * Where supported. Similar to HTML blur event, but can be applied to any focusable 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 DOMActivate
      * Where supported. Fires when an element is activated, for instance, through a mouse click or a keypress.
      * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
@@ -341,49 +358,49 @@ if(opt.anim.isAnimated()){
      */
 
         //  DOM Mutation events
-        /**
+        /**
      * @event DOMSubtreeModified
      * Where supported. Fires when the subtree is modified.
      * @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 DOMNodeInserted
      * Where supported. Fires when a node has been added as a child of another node.
      * @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 DOMNodeRemoved
      * Where supported. Fires when a descendant node of the element is removed.
      * @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 DOMNodeRemovedFromDocument
      * Where supported. Fires when a node is being removed from a document.
      * @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 DOMNodeInsertedIntoDocument
      * Where supported. Fires when a node is being inserted into a document.
      * @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 DOMAttrModified
      * Where supported. Fires when an attribute has been modified.
      * @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 DOMCharacterDataModified
      * Where supported. Fires when the character data has been modified.
      * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
@@ -391,13 +408,13 @@ if(opt.anim.isAnimated()){
      * @param {Object} o The options configuration passed to the {@link #addListener} call.
      */
 
-        /**
+        /**
      * The default unit to append to CSS values where a unit isn't provided (defaults to px).
      * @type String
      */
         defaultUnit: "px",
 
-        /**
+        /**
      * Returns true if this element matches the passed simple selector (e.g. div.some-class or span:first-child)
      * @param {String} selector The simple selector to test
      * @return {Boolean} True if this element matches the selector, else false
@@ -406,7 +423,7 @@ if(opt.anim.isAnimated()){
             return Ext.DomQuery.is(this.dom, simpleSelector);
         },
 
-        /**
+        /**
      * Tries to focus the element. Any exceptions are caught and ignored.
      * @param {Number} defer (optional) Milliseconds to defer the focus
      * @return {Ext.core.Element} this
@@ -426,7 +443,7 @@ if(opt.anim.isAnimated()){
             return me;
         },
 
-        /**
+        /**
      * Tries to blur the element. Any exceptions are caught and ignored.
      * @return {Ext.core.Element} this
      */
@@ -437,7 +454,7 @@ if(opt.anim.isAnimated()){
             return this;
         },
 
-        /**
+        /**
      * Returns the value of the "value" attribute
      * @param {Boolean} asNumber true to parse the value as a number
      * @return {String/Number}
@@ -447,7 +464,7 @@ if(opt.anim.isAnimated()){
             return asNumber ? parseInt(val, 10) : val;
         },
 
-        /**
+        /**
      * Appends an event handler to this element.  The shorthand version {@link #on} is equivalent.
      * @param {String} eventName The name of event to handle.
      * @param {Function} fn The handler function the event invokes. This function is passed
@@ -557,7 +574,7 @@ el.on(
             return this;
         },
 
-        /**
+        /**
      * 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.
@@ -578,7 +595,7 @@ el.un('click', this.handlerFn);
             return this;
         },
 
-        /**
+        /**
      * Removes all previous added listeners from this element
      * @return {Ext.core.Element} this
      */
@@ -587,7 +604,7 @@ el.un('click', this.handlerFn);
             return this;
         },
 
-        /**
+        /**
          * Recursively removes all previous added listeners from this element and its children
          * @return {Ext.core.Element} this
          */
@@ -596,7 +613,7 @@ el.un('click', this.handlerFn);
             return this;
         },
 
-        /**
+        /**
          * @private Test if size has a unit, otherwise appends the passed unit string, or the default for this Element.
          * @param size {Mixed} The size to set
          * @param units {String} The units to append to a numeric size value
@@ -625,7 +642,7 @@ el.un('click', this.handlerFn);
             return size;
         },
 
-        /**
+        /**
          * Tests various css rules/browsers to determine if this element uses a border box
          * @return {Boolean}
          */
@@ -633,7 +650,7 @@ el.un('click', this.handlerFn);
             return Ext.isBorderBox || noBoxAdjust[(this.dom.tagName || "").toLowerCase()];
         },
 
-        /**
+        /**
          * <p>Removes this element's dom reference.  Note that event and cache removal is handled at {@link Ext#removeNode Ext.removeNode}</p>
          */
         remove: function() {
@@ -646,7 +663,7 @@ el.un('click', this.handlerFn);
             }
         },
 
-        /**
+        /**
          * 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.
@@ -661,7 +678,7 @@ el.un('click', this.handlerFn);
             return me;
         },
 
-        /**
+        /**
          * Returns true if this element is an ancestor of the passed element
          * @param {HTMLElement/String} el The element to check
          * @return {Boolean} True if this element is an ancestor of el, else false
@@ -670,7 +687,7 @@ el.un('click', this.handlerFn);
             return ! el ? false: Ext.core.Element.isAncestor(this.dom, el.dom ? el.dom: el);
         },
 
-        /**
+        /**
          * Returns the value of a namespaced attribute from the element's underlying DOM node.
          * @param {String} namespace The namespace in which to look for the attribute
          * @param {String} name The attribute name
@@ -681,11 +698,12 @@ el.un('click', this.handlerFn);
             return this.getAttribute(name, ns);
         },
 
-        /**
+        /**
          * Returns the value of an attribute from the element's underlying DOM node.
          * @param {String} name The attribute name
          * @param {String} namespace (optional) The namespace in which to look for the attribute
          * @return {String} The attribute value
+         * @method
          */
         getAttribute: (Ext.isIE && !(Ext.isIE9 && document.documentMode === 9)) ?
         function(name, ns) {
@@ -710,7 +728,7 @@ el.un('click', this.handlerFn);
             return  d.getAttribute(name) || d[name] || null;
         },
 
-        /**
+        /**
          * Update the innerHTML of this element
          * @param {String} html The new HTML
          * @return {Ext.core.Element} this
@@ -729,7 +747,7 @@ el.un('click', this.handlerFn);
         Ext.apply(ep, o);
     };
 
-    /**
+    /**
      * Appends an event handler (shorthand for {@link #addListener}).
      * @param {String} eventName The name of event to handle.
      * @param {Function} fn The handler function the event invokes.
@@ -740,7 +758,7 @@ el.un('click', this.handlerFn);
      */
     ep.on = ep.addListener;
 
-    /**
+    /**
      * Removes an event handler from this element (see {@link #removeListener} for additional notes).
      * @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>
@@ -752,7 +770,7 @@ el.un('click', this.handlerFn);
      */
     ep.un = ep.removeListener;
 
-    /**
+    /**
      * Removes all previous added listeners from this element
      * @return {Ext.core.Element} this
      * @member Ext.core.Element
@@ -760,7 +778,7 @@ el.un('click', this.handlerFn);
      */
     ep.clearListeners = ep.removeAllListeners;
 
-    /**
+    /**
      * Removes this element's dom reference.  Note that event and cache removal is handled at {@link Ext#removeNode Ext.removeNode}.
      * Alias to {@link #remove}.
      * @member Ext.core.Element
@@ -768,7 +786,7 @@ el.un('click', this.handlerFn);
      */
     ep.destroy = ep.remove;
 
-    /**
+    /**
      * true to automatically adjust width and height settings for box-model issues (default to true)
      */
     ep.autoBoxAdjust = true;
@@ -777,7 +795,7 @@ el.un('click', this.handlerFn);
     var unitPattern = /\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,
     docEl;
 
-    /**
+    /**
      * Retrieves Ext.core.Element objects.
      * <p><b>This method does not retrieve {@link Ext.Component Component}s.</b> This method
      * retrieves Ext.core.Element objects which encapsulate DOM elements. To retrieve a Component by
@@ -949,7 +967,7 @@ el.un('click', this.handlerFn);
     El.Flyweight.prototype.isFlyweight = true;
     El._flyweights = {};
 
-    /**
+    /**
      * <p>Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element -
      * the dom node can be overwritten by other code. Shorthand of {@link Ext.core.Element#fly}</p>
      * <p>Use this to make one-time references to DOM elements which are not going to be accessed again either by
@@ -1015,4 +1033,6 @@ el.un('click', this.handlerFn);
         noBoxAdjust['button'] = 1;
     }
 })();
-
\ No newline at end of file +
+ +