Upgrade to ExtJS 3.1.0 - Released 12/16/2009
[extjs.git] / docs / source / Element.html
index 2bb0d88..17a3495 100644 (file)
-<html>
-<head>
-  <title>The source code</title>
-    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
-    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
-</head>
-<body  onload="prettyPrint();">
-    <pre class="prettyprint lang-js">/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-/**\r
- * @class Ext.Element\r
- * <p>Encapsulates a DOM element, adding simple DOM manipulation facilities, normalizing for browser differences.</p>\r
- * <p>All instances of this class inherit the methods of {@link Ext.Fx} making visual effects easily available to all DOM elements.</p>\r
- * <p>Note that the events documented in this class are not Ext events, they encapsulate browser events. To\r
- * access the underlying browser event, see {@link Ext.EventObject#browserEvent}. Some older\r
- * browsers may not support the full range of events. Which events are supported is beyond the control of ExtJs.</p>\r
- * Usage:<br>\r
-<pre><code>\r
-// by id\r
-var el = Ext.get("my-div");\r
-\r
-// by DOM element reference\r
-var el = Ext.get(myDivElement);\r
-</code></pre>\r
- * <b>Animations</b><br />\r
- * <p>When an element is manipulated, by default there is no animation.</p>\r
- * <pre><code>\r
-var el = Ext.get("my-div");\r
-\r
-// no animation\r
-el.setWidth(100);\r
- * </code></pre>\r
- * <p>Many of the functions for manipulating an element have an optional "animate" parameter.  This\r
- * parameter can be specified as boolean (<tt>true</tt>) for default animation effects.</p>\r
- * <pre><code>\r
-// default animation\r
-el.setWidth(100, true);\r
- * </code></pre>\r
- * \r
- * <p>To configure the effects, an object literal with animation options to use as the Element animation\r
- * configuration object can also be specified. Note that the supported Element animation configuration\r
- * options are a subset of the {@link Ext.Fx} animation options specific to Fx effects.  The supported\r
- * Element animation configuration options are:</p>\r
-<pre>\r
-Option    Default   Description\r
---------- --------  ---------------------------------------------\r
-{@link Ext.Fx#duration duration}  .35       The duration of the animation in seconds\r
-{@link Ext.Fx#easing easing}    easeOut   The easing method\r
-{@link Ext.Fx#callback callback}  none      A function to execute when the anim completes\r
-{@link Ext.Fx#scope scope}     this      The scope (this) of the callback function\r
-</pre>\r
- * \r
- * <pre><code>\r
-// Element animation options object\r
-var opt = {\r
-    {@link Ext.Fx#duration duration}: 1,\r
-    {@link Ext.Fx#easing easing}: 'elasticIn',\r
-    {@link Ext.Fx#callback callback}: this.foo,\r
-    {@link Ext.Fx#scope scope}: this\r
-};\r
-// animation with some options set\r
-el.setWidth(100, opt);\r
- * </code></pre>\r
- * <p>The Element animation object being used for the animation will be set on the options\r
- * object as "anim", which allows you to stop or manipulate the animation. Here is an example:</p>\r
- * <pre><code>\r
-// using the "anim" property to get the Anim object\r
-if(opt.anim.isAnimated()){\r
-    opt.anim.stop();\r
-}\r
- * </code></pre>\r
- * <p>Also see the <tt>{@link #animate}</tt> method for another animation technique.</p>\r
- * <p><b> Composite (Collections of) Elements</b></p>\r
- * <p>For working with collections of Elements, see {@link Ext.CompositeElement}</p>\r
- * @constructor Create a new Element directly.\r
- * @param {String/HTMLElement} element\r
- * @param {Boolean} forceNew (optional) By default the constructor checks to see if there is already an instance of this element in the cache and if there is it returns the same instance. This will skip that check (useful for extending this class).\r
- */\r
-(function(){\r
-var DOC = document;\r
-\r
-Ext.Element = function(element, forceNew){\r
-    var dom = typeof element == "string" ?\r
-              DOC.getElementById(element) : element,\r
-        id;\r
-\r
-    if(!dom) return null;\r
-\r
-    id = dom.id;\r
-\r
-    if(!forceNew && id && Ext.Element.cache[id]){ // element object already exists\r
-        return Ext.Element.cache[id];\r
-    }\r
-\r
-    <div id="prop-Ext.Element-dom"></div>/**\r
-     * The DOM element\r
-     * @type HTMLElement\r
-     */\r
-    this.dom = dom;\r
-\r
-    <div id="prop-Ext.Element-id"></div>/**\r
-     * The DOM element ID\r
-     * @type String\r
-     */\r
-    this.id = id || Ext.id(dom);\r
-};\r
-\r
-var D = Ext.lib.Dom,\r
-    DH = Ext.DomHelper,\r
-    E = Ext.lib.Event,\r
-    A = Ext.lib.Anim,\r
-    El = Ext.Element;\r
-\r
-El.prototype = {\r
-    <div id="method-Ext.Element-set"></div>/**\r
-     * Sets the passed attributes as attributes of this element (a style attribute can be a string, object or function)\r
-     * @param {Object} o The object with the attributes\r
-     * @param {Boolean} useSet (optional) false to override the default setAttribute to use expandos.\r
-     * @return {Ext.Element} this\r
-     */\r
-    set : function(o, useSet){\r
-        var el = this.dom,\r
-            attr,\r
-            val;        \r
-       \r
-        for(attr in o){\r
-            val = o[attr];\r
-            if (attr != "style" && !Ext.isFunction(val)) {\r
-                if (attr == "cls" ) {\r
-                    el.className = val;\r
-                } else if (o.hasOwnProperty(attr)) {\r
-                    if (useSet || !!el.setAttribute) el.setAttribute(attr, val);\r
-                    else el[attr] = val;\r
-                }\r
-            }\r
-        }\r
-        if(o.style){\r
-            DH.applyStyles(el, o.style);\r
-        }\r
-        return this;\r
-    },\r
-    \r
-//  Mouse events\r
-    <div id="event-Ext.Element-click"></div>/**\r
-     * @event click\r
-     * Fires when a mouse click is detected within the element.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-contextmenu"></div>/**\r
-     * @event contextmenu\r
-     * Fires when a right click is detected within the element.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-dblclick"></div>/**\r
-     * @event dblclick\r
-     * Fires when a mouse double click is detected within the element.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-mousedown"></div>/**\r
-     * @event mousedown\r
-     * Fires when a mousedown is detected within the element.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-mouseup"></div>/**\r
-     * @event mouseup\r
-     * Fires when a mouseup is detected within the element.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-mouseover"></div>/**\r
-     * @event mouseover\r
-     * Fires when a mouseover is detected within the element.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-mousemove"></div>/**\r
-     * @event mousemove\r
-     * Fires when a mousemove is detected with the element.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-mouseout"></div>/**\r
-     * @event mouseout\r
-     * Fires when a mouseout is detected with the element.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-mouseenter"></div>/**\r
-     * @event mouseenter\r
-     * Fires when the mouse enters the element.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-mouseleave"></div>/**\r
-     * @event mouseleave\r
-     * Fires when the mouse leaves the element.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    \r
-//  Keyboard events\r
-    <div id="event-Ext.Element-keypress"></div>/**\r
-     * @event keypress\r
-     * Fires when a keypress is detected within the element.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-keydown"></div>/**\r
-     * @event keydown\r
-     * Fires when a keydown is detected within the element.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-keyup"></div>/**\r
-     * @event keyup\r
-     * Fires when a keyup is detected within the element.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-\r
-\r
-//  HTML frame/object events\r
-    <div id="event-Ext.Element-load"></div>/**\r
-     * @event load\r
-     * Fires when the user agent finishes loading all content within the element. Only supported by window, frames, objects and images.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-unload"></div>/**\r
-     * @event unload\r
-     * 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.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-abort"></div>/**\r
-     * @event abort\r
-     * Fires when an object/image is stopped from loading before completely loaded.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-error"></div>/**\r
-     * @event error\r
-     * Fires when an object/image/frame cannot be loaded properly.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-resize"></div>/**\r
-     * @event resize\r
-     * Fires when a document view is resized.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-scroll"></div>/**\r
-     * @event scroll\r
-     * Fires when a document view is scrolled.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-\r
-//  Form events\r
-    <div id="event-Ext.Element-select"></div>/**\r
-     * @event select\r
-     * Fires when a user selects some text in a text field, including input and textarea.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-change"></div>/**\r
-     * @event change\r
-     * Fires when a control loses the input focus and its value has been modified since gaining focus.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-submit"></div>/**\r
-     * @event submit\r
-     * Fires when a form is submitted.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-reset"></div>/**\r
-     * @event reset\r
-     * Fires when a form is reset.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-focus"></div>/**\r
-     * @event focus\r
-     * Fires when an element receives focus either via the pointing device or by tab navigation.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-blur"></div>/**\r
-     * @event blur\r
-     * Fires when an element loses focus either via the pointing device or by tabbing navigation.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-\r
-//  User Interface events\r
-    <div id="event-Ext.Element-DOMFocusIn"></div>/**\r
-     * @event DOMFocusIn\r
-     * Where supported. Similar to HTML focus event, but can be applied to any focusable element.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-DOMFocusOut"></div>/**\r
-     * @event DOMFocusOut\r
-     * Where supported. Similar to HTML blur event, but can be applied to any focusable element.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-DOMActivate"></div>/**\r
-     * @event DOMActivate\r
-     * Where supported. Fires when an element is activated, for instance, through a mouse click or a keypress.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-\r
-//  DOM Mutation events\r
-    <div id="event-Ext.Element-DOMSubtreeModified"></div>/**\r
-     * @event DOMSubtreeModified\r
-     * Where supported. Fires when the subtree is modified.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-DOMNodeInserted"></div>/**\r
-     * @event DOMNodeInserted\r
-     * Where supported. Fires when a node has been added as a child of another node.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-DOMNodeRemoved"></div>/**\r
-     * @event DOMNodeRemoved\r
-     * Where supported. Fires when a descendant node of the element is removed.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-DOMNodeRemovedFromDocument"></div>/**\r
-     * @event DOMNodeRemovedFromDocument\r
-     * Where supported. Fires when a node is being removed from a document.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-DOMNodeInsertedIntoDocument"></div>/**\r
-     * @event DOMNodeInsertedIntoDocument\r
-     * Where supported. Fires when a node is being inserted into a document.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-DOMAttrModified"></div>/**\r
-     * @event DOMAttrModified\r
-     * Where supported. Fires when an attribute has been modified.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-    <div id="event-Ext.Element-DOMCharacterDataModified"></div>/**\r
-     * @event DOMCharacterDataModified\r
-     * Where supported. Fires when the character data has been modified.\r
-     * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.\r
-     * @param {HtmlElement} t The target of the event.\r
-     * @param {Object} o The options configuration passed to the {@link #addListener} call.\r
-     */\r
-\r
-    <div id="prop-Ext.Element-defaultUnit"></div>/**\r
-     * The default unit to append to CSS values where a unit isn't provided (defaults to px).\r
-     * @type String\r
-     */\r
-    defaultUnit : "px",\r
-\r
-    <div id="method-Ext.Element-is"></div>/**\r
-     * Returns true if this element matches the passed simple selector (e.g. div.some-class or span:first-child)\r
-     * @param {String} selector The simple selector to test\r
-     * @return {Boolean} True if this element matches the selector, else false\r
-     */\r
-    is : function(simpleSelector){\r
-        return Ext.DomQuery.is(this.dom, simpleSelector);\r
-    },\r
-\r
-    <div id="method-Ext.Element-focus"></div>/**\r
-     * Tries to focus the element. Any exceptions are caught and ignored.\r
-     * @param {Number} defer (optional) Milliseconds to defer the focus\r
-     * @return {Ext.Element} this\r
-     */\r
-    focus : function(defer, /* private */ dom) {\r
-        var me = this,\r
-            dom = dom || me.dom;\r
-        try{\r
-            if(Number(defer)){\r
-                me.focus.defer(defer, null, [null, dom]);\r
-            }else{\r
-                dom.focus();\r
-            }\r
-        }catch(e){}\r
-        return me;\r
-    },\r
-\r
-    <div id="method-Ext.Element-blur"></div>/**\r
-     * Tries to blur the element. Any exceptions are caught and ignored.\r
-     * @return {Ext.Element} this\r
-     */\r
-    blur : function() {\r
-        try{\r
-            this.dom.blur();\r
-        }catch(e){}\r
-        return this;\r
-    },\r
-\r
-    <div id="method-Ext.Element-getValue"></div>/**\r
-     * Returns the value of the "value" attribute\r
-     * @param {Boolean} asNumber true to parse the value as a number\r
-     * @return {String/Number}\r
-     */\r
-    getValue : function(asNumber){\r
-        var val = this.dom.value;\r
-        return asNumber ? parseInt(val, 10) : val;\r
-    },\r
-\r
-    <div id="method-Ext.Element-addListener"></div>/**\r
-     * Appends an event handler to this element.  The shorthand version {@link #on} is equivalent.\r
-     * @param {String} eventName The name of event to handle.\r
-     * @param {Function} fn The handler function the event invokes. This function is passed\r
-     * the following parameters:<ul>\r
-     * <li><b>evt</b> : EventObject<div class="sub-desc">The {@link Ext.EventObject EventObject} describing the event.</div></li>\r
-     * <li><b>el</b> : HtmlElement<div class="sub-desc">The DOM element which was the target of the event.\r
-     * Note that this may be filtered by using the <tt>delegate</tt> option.</div></li>\r
-     * <li><b>o</b> : Object<div class="sub-desc">The options object from the addListener call.</div></li>\r
-     * </ul>\r
-     * @param {Object} scope (optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.\r
-     * <b>If omitted, defaults to this Element.</b>.\r
-     * @param {Object} options (optional) An object containing handler configuration properties.\r
-     * This may contain any of the following properties:<ul>\r
-     * <li><b>scope</b> Object : <div class="sub-desc">The scope (<code><b>this</b></code> reference) in which the handler function is executed.\r
-     * <b>If omitted, defaults to this Element.</b></div></li>\r
-     * <li><b>delegate</b> String: <div class="sub-desc">A simple selector to filter the target or look for a descendant of the target. See below for additional details.</div></li>\r
-     * <li><b>stopEvent</b> Boolean: <div class="sub-desc">True to stop the event. That is stop propagation, and prevent the default action.</div></li>\r
-     * <li><b>preventDefault</b> Boolean: <div class="sub-desc">True to prevent the default action</div></li>\r
-     * <li><b>stopPropagation</b> Boolean: <div class="sub-desc">True to prevent event propagation</div></li>\r
-     * <li><b>normalized</b> Boolean: <div class="sub-desc">False to pass a browser event to the handler function instead of an Ext.EventObject</div></li>\r
-     * <li><b>target</b> Ext.Element: <div class="sub-desc">Only call the handler if the event was fired on the target Element, <i>not</i> if the event was bubbled up from a child node.</div></li>\r
-     * <li><b>delay</b> Number: <div class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</div></li>\r
-     * <li><b>single</b> Boolean: <div class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</div></li>\r
-     * <li><b>buffer</b> Number: <div class="sub-desc">Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed\r
-     * by the specified number of milliseconds. If the event fires again within that time, the original\r
-     * handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>\r
-     * </ul><br>\r
-     * <p>\r
-     * <b>Combining Options</b><br>\r
-     * In the following examples, the shorthand form {@link #on} is used rather than the more verbose\r
-     * addListener.  The two are equivalent.  Using the options argument, it is possible to combine different\r
-     * types of listeners:<br>\r
-     * <br>\r
-     * A delayed, one-time listener that auto stops the event and adds a custom argument (forumId) to the\r
-     * options object. The options object is available as the third parameter in the handler function.<div style="margin: 5px 20px 20px;">\r
-     * Code:<pre><code>\r
-el.on('click', this.onClick, this, {\r
-    single: true,\r
-    delay: 100,\r
-    stopEvent : true,\r
-    forumId: 4\r
-});</code></pre></p>\r
-     * <p>\r
-     * <b>Attaching multiple handlers in 1 call</b><br>\r
-     * The method also allows for a single argument to be passed which is a config object containing properties\r
-     * which specify multiple handlers.</p>\r
-     * <p>\r
-     * Code:<pre><code>\r
-el.on({\r
-    'click' : {\r
-        fn: this.onClick,\r
-        scope: this,\r
-        delay: 100\r
-    },\r
-    'mouseover' : {\r
-        fn: this.onMouseOver,\r
-        scope: this\r
-    },\r
-    'mouseout' : {\r
-        fn: this.onMouseOut,\r
-        scope: this\r
-    }\r
-});</code></pre>\r
-     * <p>\r
-     * Or a shorthand syntax:<br>\r
-     * Code:<pre><code></p>\r
-el.on({\r
-    'click' : this.onClick,\r
-    'mouseover' : this.onMouseOver,\r
-    'mouseout' : this.onMouseOut,\r
-    scope: this\r
-});\r
-     * </code></pre></p>\r
-     * <p><b>delegate</b></p>\r
-     * <p>This is a configuration option that you can pass along when registering a handler for\r
-     * an event to assist with event delegation. Event delegation is a technique that is used to\r
-     * reduce memory consumption and prevent exposure to memory-leaks. By registering an event\r
-     * for a container element as opposed to each element within a container. By setting this\r
-     * configuration option to a simple selector, the target element will be filtered to look for\r
-     * a descendant of the target.\r
-     * For example:<pre><code>\r
-// using this markup:\r
-&lt;div id='elId'>\r
-    &lt;p id='p1'>paragraph one&lt;/p>\r
-    &lt;p id='p2' class='clickable'>paragraph two&lt;/p>\r
-    &lt;p id='p3'>paragraph three&lt;/p>\r
-&lt;/div>\r
-// utilize event delegation to registering just one handler on the container element: \r
-el = Ext.get('elId');\r
-el.on(\r
-    'click',\r
-    function(e,t) {\r
-        // handle click\r
-        console.info(t.id); // 'p2'\r
-    },\r
-    this,\r
-    {\r
-        // filter the target element to be a descendant with the class 'clickable'\r
-        delegate: '.clickable' \r
-    }\r
-);\r
-     * </code></pre></p>\r
-     * @return {Ext.Element} this\r
-     */\r
-    addListener : function(eventName, fn, scope, options){\r
-        Ext.EventManager.on(this.dom,  eventName, fn, scope || this, options);\r
-        return this;\r
-    },\r
-\r
-    <div id="method-Ext.Element-removeListener"></div>/**\r
-     * Removes an event handler from this element.  The shorthand version {@link #un} is equivalent.\r
-     * <b>Note</b>: if a <i>scope</i> was explicitly specified when {@link #addListener adding} the\r
-     * listener, the same scope must be specified here.\r
-     * Example:\r
-     * <pre><code>\r
-el.removeListener('click', this.handlerFn);\r
-// or\r
-el.un('click', this.handlerFn);\r
-</code></pre>\r
-     * @param {String} eventName The name of the event from which to remove the handler.\r
-     * @param {Function} fn The handler function to remove. <b>This must be a reference to the function passed into the {@link #addListener} call.</b>\r
-     * @param {Object} scope If a scope (<b><code>this</code></b> reference) was specified when the listener was added,\r
-     * then this must refer to the same object.\r
-     * @return {Ext.Element} this\r
-     */\r
-    removeListener : function(eventName, fn, scope){\r
-        Ext.EventManager.removeListener(this.dom,  eventName, fn, scope || this);\r
-        return this;\r
-    },\r
-\r
-    <div id="method-Ext.Element-removeAllListeners"></div>/**\r
-     * Removes all previous added listeners from this element\r
-     * @return {Ext.Element} this\r
-     */\r
-    removeAllListeners : function(){\r
-        Ext.EventManager.removeAll(this.dom);\r
-        return this;\r
-    },\r
-\r
-    /**\r
-     * @private Test if size has a unit, otherwise appends the default\r
-     */\r
-    addUnits : function(size){\r
-        if(size === "" || size == "auto" || size === undefined){\r
-            size = size || '';\r
-        } else if(!isNaN(size) || !unitPattern.test(size)){\r
-            size = size + (this.defaultUnit || 'px');\r
-        }\r
-        return size;\r
-    },\r
-\r
-    <div id="method-Ext.Element-load"></div>/**\r
-     * <p>Updates the <a href="http://developer.mozilla.org/en/DOM/element.innerHTML">innerHTML</a> of this Element\r
-     * 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>\r
-     * <p>Updating innerHTML of an element will <b>not</b> execute embedded <tt>&lt;script></tt> elements. This is a browser restriction.</p>\r
-     * @param {Mixed} options. Either a sring containing the URL from which to load the HTML, or an {@link Ext.Ajax#request} options object specifying\r
-     * exactly how to request the HTML.\r
-     * @return {Ext.Element} this\r
-     */\r
-    load : function(url, params, cb){\r
-        Ext.Ajax.request(Ext.apply({\r
-            params: params,\r
-            url: url.url || url,\r
-            callback: cb,\r
-            el: this.dom,\r
-            indicatorText: url.indicatorText || ''\r
-        }, Ext.isObject(url) ? url : {}));\r
-        return this;\r
-    },\r
-\r
-    <div id="method-Ext.Element-isBorderBox"></div>/**\r
-     * Tests various css rules/browsers to determine if this element uses a border box\r
-     * @return {Boolean}\r
-     */\r
-    isBorderBox : function(){\r
-        return noBoxAdjust[(this.dom.tagName || "").toLowerCase()] || Ext.isBorderBox;\r
-    },\r
-\r
-    <div id="method-Ext.Element-remove"></div>/**\r
-     * Removes this element from the DOM and deletes it from the cache\r
-     */\r
-    remove : function(){\r
-        var me = this,\r
-            dom = me.dom;\r
-        \r
-        me.removeAllListeners();\r
-        if (dom) {\r
-            delete me.dom;\r
-            delete El.cache[dom.id];\r
-            delete El.dataCache[dom.id];\r
-            Ext.removeNode(dom);\r
-        }\r
-    },\r
-\r
-    <div id="method-Ext.Element-hover"></div>/**\r
-     * Sets up event handlers to call the passed functions when the mouse is moved into and out of the Element.\r
-     * @param {Function} overFn The function to call when the mouse enters the Element.\r
-     * @param {Function} outFn The function to call when the mouse leaves the Element.\r
-     * @param {Object} scope (optional) The scope (<code>this</code> reference) in which the functions are executed. Defaults to the Element's DOM element.\r
-     * @param {Object} options (optional) Options for the listener. See {@link Ext.util.Observable#addListener the <tt>options</tt> parameter}.\r
-     * @return {Ext.Element} this\r
-     */\r
-    hover : function(overFn, outFn, scope, options){\r
-        var me = this;\r
-        me.on('mouseenter', overFn, scope || me.dom, options);\r
-        me.on('mouseleave', outFn, scope || me.dom, options);\r
-        return me;\r
-    },\r
-\r
-    <div id="method-Ext.Element-contains"></div>/**\r
-     * Returns true if this element is an ancestor of the passed element\r
-     * @param {HTMLElement/String} el The element to check\r
-     * @return {Boolean} True if this element is an ancestor of el, else false\r
-     */\r
-    contains : function(el){\r
-        return !el ? false : Ext.lib.Dom.isAncestor(this.dom, el.dom ? el.dom : el);\r
-    },\r
-\r
-    <div id="method-Ext.Element-getAttributeNS"></div>/**\r
-     * Returns the value of a namespaced attribute from the element's underlying DOM node.\r
-     * @param {String} namespace The namespace in which to look for the attribute\r
-     * @param {String} name The attribute name\r
-     * @return {String} The attribute value\r
-     * @deprecated\r
-     */\r
-    getAttributeNS : function(ns, name){\r
-        return this.getAttribute(name, ns); \r
-    },\r
-    \r
-    <div id="method-Ext.Element-getAttribute"></div>/**\r
-     * Returns the value of an attribute from the element's underlying DOM node.\r
-     * @param {String} name The attribute name\r
-     * @param {String} namespace (optional) The namespace in which to look for the attribute\r
-     * @return {String} The attribute value\r
-     */\r
-    getAttribute : Ext.isIE ? function(name, ns){\r
-        var d = this.dom,\r
-            type = typeof d[ns + ":" + name];\r
-\r
-        if(['undefined', 'unknown'].indexOf(type) == -1){\r
-            return d[ns + ":" + name];\r
-        }\r
-        return d[name];\r
-    } : function(name, ns){\r
-        var d = this.dom;\r
-        return d.getAttributeNS(ns, name) || d.getAttribute(ns + ":" + name) || d.getAttribute(name) || d[name];\r
-    },\r
-    \r
-    <div id="method-Ext.Element-update"></div>/**\r
-    * Update the innerHTML of this element\r
-    * @param {String} html The new HTML\r
-    * @return {Ext.Element} this\r
-     */\r
-    update : function(html) {\r
-        if (this.dom) {\r
-            this.dom.innerHTML = html;\r
-        }\r
-        return this;\r
-    }\r
-};\r
-\r
-var ep = El.prototype;\r
-\r
-El.addMethods = function(o){\r
-   Ext.apply(ep, o);\r
-};\r
-\r
-<div id="method-Ext.Element-on"></div>/**\r
- * Appends an event handler (shorthand for {@link #addListener}).\r
- * @param {String} eventName The name of event to handle.\r
- * @param {Function} fn The handler function the event invokes.\r
- * @param {Object} scope (optional) The scope (<code>this</code> reference) in which the handler function is executed.\r
- * @param {Object} options (optional) An object containing standard {@link #addListener} options\r
- * @member Ext.Element\r
- * @method on\r
- */\r
-ep.on = ep.addListener;\r
-\r
-<div id="method-Ext.Element-un"></div>/**\r
- * Removes an event handler from this element (see {@link #removeListener} for additional notes).\r
- * @param {String} eventName The name of the event from which to remove the handler.\r
- * @param {Function} fn The handler function to remove. <b>This must be a reference to the function passed into the {@link #addListener} call.</b>\r
- * @param {Object} scope If a scope (<b><code>this</code></b> reference) was specified when the listener was added,\r
- * then this must refer to the same object.\r
- * @return {Ext.Element} this\r
- * @member Ext.Element\r
- * @method un\r
- */\r
-ep.un = ep.removeListener;\r
-\r
-<div id="prop-Ext.Element-autoBoxAdjust"></div>/**\r
- * true to automatically adjust width and height settings for box-model issues (default to true)\r
- */\r
-ep.autoBoxAdjust = true;\r
-\r
-// private\r
-var unitPattern = /\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,\r
-    docEl;\r
-\r
-/**\r
- * @private\r
- */\r
-El.cache = {};\r
-El.dataCache = {};\r
-\r
-<div id="method-Ext.Element-get"></div>/**\r
- * Retrieves Ext.Element objects.\r
- * <p><b>This method does not retrieve {@link Ext.Component Component}s.</b> This method\r
- * retrieves Ext.Element objects which encapsulate DOM elements. To retrieve a Component by\r
- * its ID, use {@link Ext.ComponentMgr#get}.</p>\r
- * <p>Uses simple caching to consistently return the same object. Automatically fixes if an\r
- * object was recreated with the same id via AJAX or DOM.</p>\r
- * @param {Mixed} el The id of the node, a DOM Node or an existing Element.\r
- * @return {Element} The Element object (or null if no matching element was found)\r
- * @static\r
- * @member Ext.Element\r
- * @method get\r
- */\r
-El.get = function(el){\r
-    var ex,\r
-        elm,\r
-        id;\r
-    if(!el){ return null; }\r
-    if (typeof el == "string") { // element id\r
-        if (!(elm = DOC.getElementById(el))) {\r
-            return null;\r
-        }\r
-        if (ex = El.cache[el]) {\r
-            ex.dom = elm;\r
-        } else {\r
-            ex = El.cache[el] = new El(elm);\r
-        }\r
-        return ex;\r
-    } else if (el.tagName) { // dom element\r
-        if(!(id = el.id)){\r
-            id = Ext.id(el);\r
-        }\r
-        if(ex = El.cache[id]){\r
-            ex.dom = el;\r
-        }else{\r
-            ex = El.cache[id] = new El(el);\r
-        }\r
-        return ex;\r
-    } else if (el instanceof El) {\r
-        if(el != docEl){\r
-            el.dom = DOC.getElementById(el.id) || el.dom; // refresh dom element in case no longer valid,\r
-                                                          // catch case where it hasn't been appended\r
-            El.cache[el.id] = el; // in case it was created directly with Element(), let's cache it\r
-        }\r
-        return el;\r
-    } else if(el.isComposite) {\r
-        return el;\r
-    } else if(Ext.isArray(el)) {\r
-        return El.select(el);\r
-    } else if(el == DOC) {\r
-        // create a bogus element object representing the document object\r
-        if(!docEl){\r
-            var f = function(){};\r
-            f.prototype = El.prototype;\r
-            docEl = new f();\r
-            docEl.dom = DOC;\r
-        }\r
-        return docEl;\r
-    }\r
-    return null;\r
-};\r
-\r
-// private method for getting and setting element data\r
-El.data = function(el, key, value){\r
-    var c = El.dataCache[el.id];\r
-    if(!c){\r
-        c = El.dataCache[el.id] = {};\r
-    }\r
-    if(arguments.length == 2){\r
-        return c[key];    \r
-    }else{\r
-        return (c[key] = value);\r
-    }\r
-};\r
-\r
-// private\r
-// Garbage collection - uncache elements/purge listeners on orphaned elements\r
-// so we don't hold a reference and cause the browser to retain them\r
-function garbageCollect(){\r
-    if(!Ext.enableGarbageCollector){\r
-        clearInterval(El.collectorThread);\r
-    } else {\r
-        var eid,\r
-            el,\r
-            d;\r
-\r
-        for(eid in El.cache){\r
-            el = El.cache[eid];\r
-            d = el.dom;\r
-            // -------------------------------------------------------\r
-            // Determining what is garbage:\r
-            // -------------------------------------------------------\r
-            // !d\r
-            // dom node is null, definitely garbage\r
-            // -------------------------------------------------------\r
-            // !d.parentNode\r
-            // no parentNode == direct orphan, definitely garbage\r
-            // -------------------------------------------------------\r
-            // !d.offsetParent && !document.getElementById(eid)\r
-            // display none elements have no offsetParent so we will\r
-            // also try to look it up by it's id. However, check\r
-            // offsetParent first so we don't do unneeded lookups.\r
-            // This enables collection of elements that are not orphans\r
-            // directly, but somewhere up the line they have an orphan\r
-            // parent.\r
-            // -------------------------------------------------------\r
-            if(!d || !d.parentNode || (!d.offsetParent && !DOC.getElementById(eid))){\r
-                delete El.cache[eid];\r
-                if(d && Ext.enableListenerCollection){\r
-                    Ext.EventManager.removeAll(d);\r
-                }\r
-            }\r
-        }\r
-    }\r
-}\r
-El.collectorThreadId = setInterval(garbageCollect, 30000);\r
-\r
-var flyFn = function(){};\r
-flyFn.prototype = El.prototype;\r
-\r
-// dom is optional\r
-El.Flyweight = function(dom){\r
-    this.dom = dom;\r
-};\r
-\r
-El.Flyweight.prototype = new flyFn();\r
-El.Flyweight.prototype.isFlyweight = true;\r
-El._flyweights = {};\r
-\r
-<div id="method-Ext.Element-fly"></div>/**\r
- * <p>Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element -\r
- * the dom node can be overwritten by other code. Shorthand of {@link Ext.Element#fly}</p>\r
- * <p>Use this to make one-time references to DOM elements which are not going to be accessed again either by\r
- * application code, or by Ext's classes. If accessing an element which will be processed regularly, then {@link Ext#get}\r
- * will be more appropriate to take advantage of the caching provided by the Ext.Element class.</p>\r
- * @param {String/HTMLElement} el The dom node or id\r
- * @param {String} named (optional) Allows for creation of named reusable flyweights to prevent conflicts\r
- * (e.g. internally Ext uses "_global")\r
- * @return {Element} The shared Element object (or null if no matching element was found)\r
- * @member Ext.Element\r
- * @method fly\r
- */\r
-El.fly = function(el, named){\r
-    var ret = null;\r
-    named = named || '_global';\r
-\r
-    if (el = Ext.getDom(el)) {\r
-        (El._flyweights[named] = El._flyweights[named] || new El.Flyweight()).dom = el;\r
-        ret = El._flyweights[named];\r
-    }\r
-    return ret;\r
-};\r
-\r
-<div id="method-Ext-get"></div>/**\r
- * Retrieves Ext.Element objects.\r
- * <p><b>This method does not retrieve {@link Ext.Component Component}s.</b> This method\r
- * retrieves Ext.Element objects which encapsulate DOM elements. To retrieve a Component by\r
- * its ID, use {@link Ext.ComponentMgr#get}.</p>\r
- * <p>Uses simple caching to consistently return the same object. Automatically fixes if an\r
- * object was recreated with the same id via AJAX or DOM.</p>\r
- * Shorthand of {@link Ext.Element#get}\r
- * @param {Mixed} el The id of the node, a DOM Node or an existing Element.\r
- * @return {Element} The Element object (or null if no matching element was found)\r
- * @member Ext\r
- * @method get\r
- */\r
-Ext.get = El.get;\r
-\r
-<div id="method-Ext-fly"></div>/**\r
- * <p>Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element -\r
- * the dom node can be overwritten by other code. Shorthand of {@link Ext.Element#fly}</p>\r
- * <p>Use this to make one-time references to DOM elements which are not going to be accessed again either by\r
- * application code, or by Ext's classes. If accessing an element which will be processed regularly, then {@link Ext#get}\r
- * will be more appropriate to take advantage of the caching provided by the Ext.Element class.</p>\r
- * @param {String/HTMLElement} el The dom node or id\r
- * @param {String} named (optional) Allows for creation of named reusable flyweights to prevent conflicts\r
- * (e.g. internally Ext uses "_global")\r
- * @return {Element} The shared Element object (or null if no matching element was found)\r
- * @member Ext\r
- * @method fly\r
- */\r
-Ext.fly = El.fly;\r
-\r
-// speedy lookup for elements never to box adjust\r
-var noBoxAdjust = Ext.isStrict ? {\r
-    select:1\r
-} : {\r
-    input:1, select:1, textarea:1\r
-};\r
-if(Ext.isIE || Ext.isGecko){\r
-    noBoxAdjust['button'] = 1;\r
-}\r
-\r
-\r
-Ext.EventManager.on(window, 'unload', function(){\r
-    delete El.cache;\r
-    delete El.dataCache;\r
-    delete El._flyweights;\r
-});\r
-})();\r
+<html>\r
+<head>\r
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    \r
+  <title>The source code</title>\r
+    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body  onload="prettyPrint();">\r
+    <pre class="prettyprint lang-js">/**
+ * @class Ext.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} making visual effects easily available to all DOM elements.</p>
+ * <p>Note that the events documented in this class are not Ext events, they encapsulate browser events. To
+ * access the underlying browser event, see {@link Ext.EventObject#browserEvent}. Some older
+ * browsers may not support the full range of events. Which events are supported is beyond the control of ExtJs.</p>
+ * Usage:<br>
+<pre><code>
+// by id
+var el = Ext.get("my-div");
+
+// by DOM element reference
+var el = Ext.get(myDivElement);
+</code></pre>
+ * <b>Animations</b><br />
+ * <p>When an element is manipulated, by default there is no animation.</p>
+ * <pre><code>
+var el = Ext.get("my-div");
+
+// no animation
+el.setWidth(100);
+ * </code></pre>
+ * <p>Many of the functions for manipulating an element have an optional "animate" parameter.  This
+ * parameter can be specified as boolean (<tt>true</tt>) for default animation effects.</p>
+ * <pre><code>
+// default animation
+el.setWidth(100, true);
+ * </code></pre>
+ *
+ * <p>To configure the effects, an object literal with animation options to use as the Element animation
+ * configuration object can also be specified. Note that the supported Element animation configuration
+ * options are a subset of the {@link Ext.Fx} animation options specific to Fx effects.  The supported
+ * Element animation configuration options are:</p>
+<pre>
+Option    Default   Description
+--------- --------  ---------------------------------------------
+{@link Ext.Fx#duration duration}  .35       The duration of the animation in seconds
+{@link Ext.Fx#easing easing}    easeOut   The easing method
+{@link Ext.Fx#callback callback}  none      A function to execute when the anim completes
+{@link Ext.Fx#scope scope}     this      The scope (this) of the callback function
 </pre>
-</body>
+ *
+ * <pre><code>
+// Element animation options object
+var opt = {
+    {@link Ext.Fx#duration duration}: 1,
+    {@link Ext.Fx#easing easing}: 'elasticIn',
+    {@link Ext.Fx#callback callback}: this.foo,
+    {@link Ext.Fx#scope scope}: this
+};
+// animation with some options set
+el.setWidth(100, opt);
+ * </code></pre>
+ * <p>The Element animation object being used for the animation will be set on the options
+ * object as "anim", which allows you to stop or manipulate the animation. Here is an example:</p>
+ * <pre><code>
+// using the "anim" property to get the Anim object
+if(opt.anim.isAnimated()){
+    opt.anim.stop();
+}
+ * </code></pre>
+ * <p>Also see the <tt>{@link #animate}</tt> method for another animation technique.</p>
+ * <p><b> Composite (Collections of) Elements</b></p>
+ * <p>For working with collections of Elements, see {@link Ext.CompositeElement}</p>
+ * @constructor Create a new Element directly.
+ * @param {String/HTMLElement} element
+ * @param {Boolean} forceNew (optional) By default the constructor checks to see if there is already an instance of this element in the cache and if there is it returns the same instance. This will skip that check (useful for extending this class).
+ */
+(function(){
+var DOC = document;
+
+Ext.Element = function(element, forceNew){
+    var dom = typeof element == "string" ?
+              DOC.getElementById(element) : element,
+        id;
+
+    if(!dom) return null;
+
+    id = dom.id;
+
+    if(!forceNew && id && Ext.elCache[id]){ // element object already exists
+        return Ext.elCache[id].el;
+    }
+
+    <div id="prop-Ext.Element-dom"></div>/**
+     * The DOM element
+     * @type HTMLElement
+     */
+    this.dom = dom;
+
+    <div id="prop-Ext.Element-id"></div>/**
+     * The DOM element ID
+     * @type String
+     */
+    this.id = id || Ext.id(dom);
+};
+
+var D = Ext.lib.Dom,
+    DH = Ext.DomHelper,
+    E = Ext.lib.Event,
+    A = Ext.lib.Anim,
+    El = Ext.Element,
+    EC = Ext.elCache;
+
+El.prototype = {
+    <div id="method-Ext.Element-set"></div>/**
+     * 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.
+     * @return {Ext.Element} this
+     */
+    set : function(o, useSet){
+        var el = this.dom,
+            attr,
+            val,
+            useSet = (useSet !== false) && !!el.setAttribute;
+
+        for(attr in o){
+            if (o.hasOwnProperty(attr)) {
+                val = o[attr];
+                if (attr == 'style') {
+                    DH.applyStyles(el, val);
+                } else if (attr == 'cls') {
+                    el.className = val;
+                } else if (useSet) {
+                    el.setAttribute(attr, val);
+                } else {
+                    el[attr] = val;
+                }
+            }
+        }
+        return this;
+    },
+
+//  Mouse events
+    <div id="event-Ext.Element-click"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-contextmenu"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-dblclick"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-mousedown"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-mouseup"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-mouseover"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-mousemove"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-mouseout"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-mouseenter"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-mouseleave"></div>/**
+     * @event mouseleave
+     * Fires when the mouse leaves 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.
+     */
+
+//  Keyboard events
+    <div id="event-Ext.Element-keypress"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-keydown"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-keyup"></div>/**
+     * @event keyup
+     * Fires when a keyup 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.
+     */
+
+
+//  HTML frame/object events
+    <div id="event-Ext.Element-load"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-unload"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-abort"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-error"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-resize"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-scroll"></div>/**
+     * @event scroll
+     * Fires when a document view is scrolled.
+     * @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.
+     */
+
+//  Form events
+    <div id="event-Ext.Element-select"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-change"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-submit"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-reset"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-focus"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-blur"></div>/**
+     * @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.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+
+//  User Interface events
+    <div id="event-Ext.Element-DOMFocusIn"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-DOMFocusOut"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-DOMActivate"></div>/**
+     * @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.
+     * @param {HtmlElement} t The target of the event.
+     * @param {Object} o The options configuration passed to the {@link #addListener} call.
+     */
+
+//  DOM Mutation events
+    <div id="event-Ext.Element-DOMSubtreeModified"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-DOMNodeInserted"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-DOMNodeRemoved"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-DOMNodeRemovedFromDocument"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-DOMNodeInsertedIntoDocument"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-DOMAttrModified"></div>/**
+     * @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.
+     */
+    <div id="event-Ext.Element-DOMCharacterDataModified"></div>/**
+     * @event DOMCharacterDataModified
+     * Where supported. Fires when the character data 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.
+     */
+
+    <div id="prop-Ext.Element-defaultUnit"></div>/**
+     * The default unit to append to CSS values where a unit isn't provided (defaults to px).
+     * @type String
+     */
+    defaultUnit : "px",
+
+    <div id="method-Ext.Element-is"></div>/**
+     * 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
+     */
+    is : function(simpleSelector){
+        return Ext.DomQuery.is(this.dom, simpleSelector);
+    },
+
+    <div id="method-Ext.Element-focus"></div>/**
+     * Tries to focus the element. Any exceptions are caught and ignored.
+     * @param {Number} defer (optional) Milliseconds to defer the focus
+     * @return {Ext.Element} this
+     */
+    focus : function(defer, /* private */ dom) {
+        var me = this,
+            dom = dom || me.dom;
+        try{
+            if(Number(defer)){
+                me.focus.defer(defer, null, [null, dom]);
+            }else{
+                dom.focus();
+            }
+        }catch(e){}
+        return me;
+    },
+
+    <div id="method-Ext.Element-blur"></div>/**
+     * Tries to blur the element. Any exceptions are caught and ignored.
+     * @return {Ext.Element} this
+     */
+    blur : function() {
+        try{
+            this.dom.blur();
+        }catch(e){}
+        return this;
+    },
+
+    <div id="method-Ext.Element-getValue"></div>/**
+     * Returns the value of the "value" attribute
+     * @param {Boolean} asNumber true to parse the value as a number
+     * @return {String/Number}
+     */
+    getValue : function(asNumber){
+        var val = this.dom.value;
+        return asNumber ? parseInt(val, 10) : val;
+    },
+
+    <div id="method-Ext.Element-addListener"></div>/**
+     * 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
+     * the following parameters:<ul>
+     * <li><b>evt</b> : EventObject<div class="sub-desc">The {@link Ext.EventObject EventObject} describing the event.</div></li>
+     * <li><b>el</b> : HtmlElement<div class="sub-desc">The DOM element which was the target of the event.
+     * Note that this may be filtered by using the <tt>delegate</tt> option.</div></li>
+     * <li><b>o</b> : Object<div class="sub-desc">The options object from the addListener call.</div></li>
+     * </ul>
+     * @param {Object} scope (optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.
+     * <b>If omitted, defaults to this Element.</b>.
+     * @param {Object} options (optional) An object containing handler configuration properties.
+     * This may contain any of the following properties:<ul>
+     * <li><b>scope</b> Object : <div class="sub-desc">The scope (<code><b>this</b></code> reference) in which the handler function is executed.
+     * <b>If omitted, defaults to this Element.</b></div></li>
+     * <li><b>delegate</b> String: <div class="sub-desc">A simple selector to filter the target or look for a descendant of the target. See below for additional details.</div></li>
+     * <li><b>stopEvent</b> Boolean: <div class="sub-desc">True to stop the event. That is stop propagation, and prevent the default action.</div></li>
+     * <li><b>preventDefault</b> Boolean: <div class="sub-desc">True to prevent the default action</div></li>
+     * <li><b>stopPropagation</b> Boolean: <div class="sub-desc">True to prevent event propagation</div></li>
+     * <li><b>normalized</b> Boolean: <div class="sub-desc">False to pass a browser event to the handler function instead of an Ext.EventObject</div></li>
+     * <li><b>target</b> Ext.Element: <div class="sub-desc">Only call the handler if the event was fired on the target Element, <i>not</i> if the event was bubbled up from a child node.</div></li>
+     * <li><b>delay</b> Number: <div class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</div></li>
+     * <li><b>single</b> Boolean: <div class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</div></li>
+     * <li><b>buffer</b> Number: <div class="sub-desc">Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed
+     * by the specified number of milliseconds. If the event fires again within that time, the original
+     * handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>
+     * </ul><br>
+     * <p>
+     * <b>Combining Options</b><br>
+     * In the following examples, the shorthand form {@link #on} is used rather than the more verbose
+     * addListener.  The two are equivalent.  Using the options argument, it is possible to combine different
+     * types of listeners:<br>
+     * <br>
+     * A delayed, one-time listener that auto stops the event and adds a custom argument (forumId) to the
+     * options object. The options object is available as the third parameter in the handler function.<div style="margin: 5px 20px 20px;">
+     * Code:<pre><code>
+el.on('click', this.onClick, this, {
+    single: true,
+    delay: 100,
+    stopEvent : true,
+    forumId: 4
+});</code></pre></p>
+     * <p>
+     * <b>Attaching multiple handlers in 1 call</b><br>
+     * The method also allows for a single argument to be passed which is a config object containing properties
+     * which specify multiple handlers.</p>
+     * <p>
+     * Code:<pre><code>
+el.on({
+    'click' : {
+        fn: this.onClick,
+        scope: this,
+        delay: 100
+    },
+    'mouseover' : {
+        fn: this.onMouseOver,
+        scope: this
+    },
+    'mouseout' : {
+        fn: this.onMouseOut,
+        scope: this
+    }
+});</code></pre>
+     * <p>
+     * Or a shorthand syntax:<br>
+     * Code:<pre><code></p>
+el.on({
+    'click' : this.onClick,
+    'mouseover' : this.onMouseOver,
+    'mouseout' : this.onMouseOut,
+    scope: this
+});
+     * </code></pre></p>
+     * <p><b>delegate</b></p>
+     * <p>This is a configuration option that you can pass along when registering a handler for
+     * an event to assist with event delegation. Event delegation is a technique that is used to
+     * reduce memory consumption and prevent exposure to memory-leaks. By registering an event
+     * for a container element as opposed to each element within a container. By setting this
+     * configuration option to a simple selector, the target element will be filtered to look for
+     * a descendant of the target.
+     * For example:<pre><code>
+// using this markup:
+&lt;div id='elId'>
+    &lt;p id='p1'>paragraph one&lt;/p>
+    &lt;p id='p2' class='clickable'>paragraph two&lt;/p>
+    &lt;p id='p3'>paragraph three&lt;/p>
+&lt;/div>
+// utilize event delegation to registering just one handler on the container element:
+el = Ext.get('elId');
+el.on(
+    'click',
+    function(e,t) {
+        // handle click
+        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;
+    },
+
+    <div id="method-Ext.Element-removeListener"></div>/**
+     * 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;
+    },
+
+    <div id="method-Ext.Element-removeAllListeners"></div>/**
+     * Removes all previous added listeners from this element
+     * @return {Ext.Element} this
+     */
+    removeAllListeners : function(){
+        Ext.EventManager.removeAll(this.dom);
+        return this;
+    },
+
+    <div id="method-Ext.Element-purgeAllListeners"></div>/**
+     * 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;
+    },
+    /**
+     * @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;
+    },
+
+    <div id="method-Ext.Element-load"></div>/**
+     * <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;
+    },
+
+    <div id="method-Ext.Element-isBorderBox"></div>/**
+     * Tests various css rules/browsers to determine if this element uses a border box
+     * @return {Boolean}
+     */
+    isBorderBox : function(){
+        return noBoxAdjust[(this.dom.tagName || "").toLowerCase()] || Ext.isBorderBox;
+    },
+
+    <div id="method-Ext.Element-remove"></div>/**
+     * <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);
+        }
+    },
+
+    <div id="method-Ext.Element-hover"></div>/**
+     * 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;
+    },
+
+    <div id="method-Ext.Element-contains"></div>/**
+     * 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
+     */
+    contains : function(el){
+        return !el ? false : Ext.lib.Dom.isAncestor(this.dom, el.dom ? el.dom : el);
+    },
+
+    <div id="method-Ext.Element-getAttributeNS"></div>/**
+     * 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
+     * @return {String} The attribute value
+     * @deprecated
+     */
+    getAttributeNS : function(ns, name){
+        return this.getAttribute(name, ns);
+    },
+
+    <div id="method-Ext.Element-getAttribute"></div>/**
+     * 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
+     */
+    getAttribute : Ext.isIE ? function(name, ns){
+        var d = this.dom,
+            type = typeof d[ns + ":" + name];
+
+        if(['undefined', 'unknown'].indexOf(type) == -1){
+            return d[ns + ":" + name];
+        }
+        return d[name];
+    } : function(name, ns){
+        var d = this.dom;
+        return d.getAttributeNS(ns, name) || d.getAttribute(ns + ":" + name) || d.getAttribute(name) || d[name];
+    },
+
+    <div id="method-Ext.Element-update"></div>/**
+    * Update the innerHTML of this element
+    * @param {String} html The new HTML
+    * @return {Ext.Element} this
+     */
+    update : function(html) {
+        if (this.dom) {
+            this.dom.innerHTML = html;
+        }
+        return this;
+    }
+};
+
+var ep = El.prototype;
+
+El.addMethods = function(o){
+   Ext.apply(ep, o);
+};
+
+<div id="method-Ext.Element-on"></div>/**
+ * 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.
+ * @param {Object} scope (optional) The scope (<code>this</code> reference) in which the handler function is executed.
+ * @param {Object} options (optional) An object containing standard {@link #addListener} options
+ * @member Ext.Element
+ * @method on
+ */
+ep.on = ep.addListener;
+
+<div id="method-Ext.Element-un"></div>/**
+ * 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>
+ * @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
+ * @member Ext.Element
+ * @method un
+ */
+ep.un = ep.removeListener;
+
+<div id="prop-Ext.Element-autoBoxAdjust"></div>/**
+ * true to automatically adjust width and height settings for box-model issues (default to true)
+ */
+ep.autoBoxAdjust = true;
+
+// private
+var unitPattern = /\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,
+    docEl;
+
+/**
+ * @private
+ */
+
+<div id="method-Ext.Element-get"></div>/**
+ * Retrieves Ext.Element objects.
+ * <p><b>This method does not retrieve {@link Ext.Component Component}s.</b> This method
+ * retrieves Ext.Element objects which encapsulate DOM elements. To retrieve a Component by
+ * its ID, use {@link Ext.ComponentMgr#get}.</p>
+ * <p>Uses simple caching to consistently return the same object. Automatically fixes if an
+ * object was recreated with the same id via AJAX or DOM.</p>
+ * @param {Mixed} el The id of the node, a DOM Node or an existing Element.
+ * @return {Element} The Element object (or null if no matching element was found)
+ * @static
+ * @member Ext.Element
+ * @method get
+ */
+El.get = function(el){
+    var ex,
+        elm,
+        id;
+    if(!el){ return null; }
+    if (typeof el == "string") { // element id
+        if (!(elm = DOC.getElementById(el))) {
+            return null;
+        }
+        if (EC[el] && EC[el].el) {
+            ex = EC[el].el;
+            ex.dom = elm;
+        } else {
+            ex = El.addToCache(new El(elm));
+        }
+        return ex;
+    } else if (el.tagName) { // dom element
+        if(!(id = el.id)){
+            id = Ext.id(el);
+        }
+        if (EC[id] && EC[id].el) {
+            ex = EC[id].el;
+            ex.dom = el;
+        } else {
+            ex = El.addToCache(new El(el));
+        }
+        return ex;
+    } else if (el instanceof El) {
+        if(el != docEl){
+            el.dom = DOC.getElementById(el.id) || el.dom; // refresh dom element in case no longer valid,
+                                                          // catch case where it hasn't been appended
+        }
+        return el;
+    } else if(el.isComposite) {
+        return el;
+    } else if(Ext.isArray(el)) {
+        return El.select(el);
+    } else if(el == DOC) {
+        // create a bogus element object representing the document object
+        if(!docEl){
+            var f = function(){};
+            f.prototype = El.prototype;
+            docEl = new f();
+            docEl.dom = DOC;
+        }
+        return docEl;
+    }
+    return null;
+};
+
+El.addToCache = function(el, id){
+    id = id || el.id;    
+    EC[id] = {
+        el:  el,
+        data: {},
+        events: {}
+    };
+    return el;
+};
+
+// private method for getting and setting element data
+El.data = function(el, key, value){
+    el = El.get(el);
+    if (!el) {
+        return null;
+    }
+    var c = EC[el.id].data;
+    if(arguments.length == 2){
+        return c[key];
+    }else{
+        return (c[key] = value);
+    }
+};
+
+// private
+// Garbage collection - uncache elements/purge listeners on orphaned elements
+// so we don't hold a reference and cause the browser to retain them
+function garbageCollect(){
+    if(!Ext.enableGarbageCollector){
+        clearInterval(El.collectorThreadId);
+    } else {
+        var eid,
+            el,
+            d,
+            o;
+
+        for(eid in EC){
+            o = EC[eid];
+            if(o.skipGC){
+                continue;
+            }
+            el = o.el;
+            d = el.dom;
+            // -------------------------------------------------------
+            // Determining what is garbage:
+            // -------------------------------------------------------
+            // !d
+            // dom node is null, definitely garbage
+            // -------------------------------------------------------
+            // !d.parentNode
+            // no parentNode == direct orphan, definitely garbage
+            // -------------------------------------------------------
+            // !d.offsetParent && !document.getElementById(eid)
+            // display none elements have no offsetParent so we will
+            // also try to look it up by it's id. However, check
+            // offsetParent first so we don't do unneeded lookups.
+            // This enables collection of elements that are not orphans
+            // directly, but somewhere up the line they have an orphan
+            // parent.
+            // -------------------------------------------------------
+            if(!d || !d.parentNode || (!d.offsetParent && !DOC.getElementById(eid))){
+                if(Ext.enableListenerCollection){
+                    Ext.EventManager.removeAll(d);
+                }
+                delete EC[eid];
+            }
+        }
+        // Cleanup IE Object leaks
+        if (Ext.isIE) {
+            var t = {};
+            for (eid in EC) {
+                t[eid] = EC[eid];
+            }
+            EC = Ext.elCache = t;
+        }
+    }
+}
+El.collectorThreadId = setInterval(garbageCollect, 30000);
+
+var flyFn = function(){};
+flyFn.prototype = El.prototype;
+
+// dom is optional
+El.Flyweight = function(dom){
+    this.dom = dom;
+};
+
+El.Flyweight.prototype = new flyFn();
+El.Flyweight.prototype.isFlyweight = true;
+El._flyweights = {};
+
+<div id="method-Ext.Element-fly"></div>/**
+ * <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.Element#fly}</p>
+ * <p>Use this to make one-time references to DOM elements which are not going to be accessed again either by
+ * application code, or by Ext's classes. If accessing an element which will be processed regularly, then {@link Ext#get}
+ * will be more appropriate to take advantage of the caching provided by the Ext.Element class.</p>
+ * @param {String/HTMLElement} el The dom node or id
+ * @param {String} named (optional) Allows for creation of named reusable flyweights to prevent conflicts
+ * (e.g. internally Ext uses "_global")
+ * @return {Element} The shared Element object (or null if no matching element was found)
+ * @member Ext.Element
+ * @method fly
+ */
+El.fly = function(el, named){
+    var ret = null;
+    named = named || '_global';
+
+    if (el = Ext.getDom(el)) {
+        (El._flyweights[named] = El._flyweights[named] || new El.Flyweight()).dom = el;
+        ret = El._flyweights[named];
+    }
+    return ret;
+};
+
+<div id="method-Ext-get"></div>/**
+ * Retrieves Ext.Element objects.
+ * <p><b>This method does not retrieve {@link Ext.Component Component}s.</b> This method
+ * retrieves Ext.Element objects which encapsulate DOM elements. To retrieve a Component by
+ * its ID, use {@link Ext.ComponentMgr#get}.</p>
+ * <p>Uses simple caching to consistently return the same object. Automatically fixes if an
+ * object was recreated with the same id via AJAX or DOM.</p>
+ * Shorthand of {@link Ext.Element#get}
+ * @param {Mixed} el The id of the node, a DOM Node or an existing Element.
+ * @return {Element} The Element object (or null if no matching element was found)
+ * @member Ext
+ * @method get
+ */
+Ext.get = El.get;
+
+<div id="method-Ext-fly"></div>/**
+ * <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.Element#fly}</p>
+ * <p>Use this to make one-time references to DOM elements which are not going to be accessed again either by
+ * application code, or by Ext's classes. If accessing an element which will be processed regularly, then {@link Ext#get}
+ * will be more appropriate to take advantage of the caching provided by the Ext.Element class.</p>
+ * @param {String/HTMLElement} el The dom node or id
+ * @param {String} named (optional) Allows for creation of named reusable flyweights to prevent conflicts
+ * (e.g. internally Ext uses "_global")
+ * @return {Element} The shared Element object (or null if no matching element was found)
+ * @member Ext
+ * @method fly
+ */
+Ext.fly = El.fly;
+
+// speedy lookup for elements never to box adjust
+var noBoxAdjust = Ext.isStrict ? {
+    select:1
+} : {
+    input:1, select:1, textarea:1
+};
+if(Ext.isIE || Ext.isGecko){
+    noBoxAdjust['button'] = 1;
+}
+
+
+Ext.EventManager.on(window, 'unload', function(){
+    delete EC;
+    delete El._flyweights;
+});
+})();
+</pre>    \r
+</body>\r
 </html>
\ No newline at end of file