- * 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.core.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:
-<div id='elId'>
- <p id='p1'>paragraph one</p>
- <p id='p2' class='clickable'>paragraph two</p>
- <p id='p3'>paragraph three</p>
-</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.core.Element} this
- */
+ * Appends an event handler to this element.
+ *
+ * @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:
+ *
+ * - **evt** : EventObject
+ *
+ * The {@link Ext.EventObject EventObject} describing the event.
+ *
+ * - **el** : HtmlElement
+ *
+ * The DOM element which was the target of the event. Note that this may be filtered by using the delegate option.
+ *
+ * - **o** : Object
+ *
+ * The options object from the addListener call.
+ *
+ * @param {Object} scope (optional) The scope (**this** reference) in which the handler function is executed. **If
+ * omitted, defaults to this Element.**
+ *
+ * @param {Object} options (optional) An object containing handler configuration properties. This may contain any of
+ * the following properties:
+ *
+ * - **scope** Object :
+ *
+ * The scope (**this** reference) in which the handler function is executed. **If omitted, defaults to this
+ * Element.**
+ *
+ * - **delegate** String:
+ *
+ * A simple selector to filter the target or look for a descendant of the target. See below for additional details.
+ *
+ * - **stopEvent** Boolean:
+ *
+ * True to stop the event. That is stop propagation, and prevent the default action.
+ *
+ * - **preventDefault** Boolean:
+ *
+ * True to prevent the default action
+ *
+ * - **stopPropagation** Boolean:
+ *
+ * True to prevent event propagation
+ *
+ * - **normalized** Boolean:
+ *
+ * False to pass a browser event to the handler function instead of an Ext.EventObject
+ *
+ * - **target** Ext.Element:
+ *
+ * Only call the handler if the event was fired on the target Element, _not_ if the event was bubbled up from a
+ * child node.
+ *
+ * - **delay** Number:
+ *
+ * The number of milliseconds to delay the invocation of the handler after the event fires.
+ *
+ * - **single** Boolean:
+ *
+ * True to add a handler to handle just the next firing of the event, and then remove itself.
+ *
+ * - **buffer** Number:
+ *
+ * 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 _not_ invoked, but the new
+ * handler is scheduled in its place.
+ *
+ * **Combining Options**
+ *
+ * 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:
+ *
+ * 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.
+ *
+ * Code:
+ *
+ * el.on('click', this.onClick, this, {
+ * single: true,
+ * delay: 100,
+ * stopEvent : true,
+ * forumId: 4
+ * });
+ *
+ * **Attaching multiple handlers in 1 call**
+ *
+ * The method also allows for a single argument to be passed which is a config object containing properties which
+ * specify multiple handlers.
+ *
+ * Code:
+ *
+ * el.on({
+ * 'click' : {
+ * fn: this.onClick,
+ * scope: this,
+ * delay: 100
+ * },
+ * 'mouseover' : {
+ * fn: this.onMouseOver,
+ * scope: this
+ * },
+ * 'mouseout' : {
+ * fn: this.onMouseOut,
+ * scope: this
+ * }
+ * });
+ *
+ * Or a shorthand syntax:
+ *
+ * Code:
+ *
+ * el.on({
+ * 'click' : this.onClick,
+ * 'mouseover' : this.onMouseOver,
+ * 'mouseout' : this.onMouseOut,
+ * scope: this
+ * });
+ *
+ * **delegate**
+ *
+ * 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:
+ *
+ * // using this markup:
+ * <div id='elId'>
+ * <p id='p1'>paragraph one</p>
+ * <p id='p2' class='clickable'>paragraph two</p>
+ * <p id='p3'>paragraph three</p>
+ * </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'
+ * }
+ * );
+ *
+ * @return {Ext.Element} this
+ */