Ext.EventManager

Files

NOTE: This is a private utility class for internal use by the framework. Don't rely on its existence.

This object has been deprecated in Sencha Touch 2.0.0. Please refer to the method documentation for specific alternatives.

This class has been deprecated since 2.0.0

Defined By

Methods

Ext.EventManager
view source
( el, eventName, handler, [scope], [options] )deprecated
Appends an event handler to an element. ...

Appends an event handler to an element. The shorthand version on is equivalent. Typically you will use Ext.Element.addListener directly on an Element in favor of calling this version.

This method has been deprecated since 2.0.0

Please use addListener on an instance of Ext.Element instead.

Parameters

  • el : String/HTMLElement

    The HTML element or id to assign the event handler to.

  • eventName : String

    The name of the event to listen for.

  • handler : Function

    The handler function the event invokes. This function is passed the following parameters:

    Parameters

  • scope : Object (optional)

    The scope (this reference) in which the handler function is executed. Defaults to the Element.

  • options : Object (optional)

    An object containing handler configuration properties. This may contain any of the following properties:

    • scope : Object (optional)

      The scope (this reference) in which the handler function is executed. Defaults to the Element.

    • delegate : String (optional)

      A simple selector to filter the target or look for a descendant of the target.

    • stopEvent : Boolean (optional)

      true to stop the event. That is stop propagation, and prevent the default action.

    • preventDefault : Boolean (optional)

      true to prevent the default action.

    • stopPropagation : Boolean (optional)

      true to prevent event propagation.

    • normalized : Boolean (optional)

      false to pass a browser event to the handler function instead of an Ext.EventObject.

    • delay : Number (optional)

      The number of milliseconds to delay the invocation of the handler after the event fires.

    • single : Boolean (optional)

      true to add a handler to handle just the next firing of the event, and then remove itself.

    • buffer : Number (optional)

      Causes the handler to be scheduled to run in an 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.

    • target : Ext.Element (optional)

      Only call the handler if the event was fired on the target Element, not if the event was bubbled up from a child node.

      See Ext.Element.addListener for examples of how to use these options.

Ext.EventManager
view source
( el, eventName, handler, [scope], [options] )deprecated
Appends an event handler to an element. ...

Appends an event handler to an element. Shorthand for addListener.

This method has been deprecated since 2.0.0

Please use addListener on an instance of Ext.Element instead.

Parameters

  • el : String/HTMLElement

    The html element or id to assign the event handler to.

  • eventName : String

    The name of the event to listen for.

  • handler : Function

    The handler function the event invokes.

  • scope : Object (optional)

    (this reference) in which the handler function executes. Defaults to the Element.

  • options : Object (optional)

    An object containing standard addListener options

Ext.EventManager
view source
( )removed
Adds a listener to be notified when the document is ready (before onload and before images are loaded). ...

Adds a listener to be notified when the document is ready (before onload and before images are loaded).

This method has been removed since 2.0.0

Please use onReady

Ext.EventManager
view source
( fn, scope, options )deprecated
Adds a listener to be notified when the browser window is resized and provides resize event buffering (50 millisecond...

Adds a listener to be notified when the browser window is resized and provides resize event buffering (50 milliseconds), passes new viewport width and height to handlers.

This method has been deprecated since 2.0.0

Please listen to the resize on Ext.Viewport instead.

Parameters

  • fn : Function

    The handler function the window resize event invokes.

  • scope : Object

    The scope (this reference) in which the handler function executes. Defaults to the browser window.

  • options : Boolean

    Options object as passed to Ext.Element.addListener

Ext.EventManager
view source
( el )deprecated
Removes all event handers from an element. ...

Removes all event handers from an element. Typically you will use Ext.Element.clearListeners directly on an Element in favor of calling this version.

This method has been deprecated since 2.0.0

Please use clearListeners on an instance of Ext.Element instead.

Parameters

  • el : String/HTMLElement

    The id or html element from which to remove all event handlers.

Ext.EventManager
view source
( el, eventName, fn, scope )deprecated
Removes an event handler from an element. ...

Removes an event handler from an element. The shorthand version un is equivalent. Typically you will use Ext.Element.removeListener directly on an Element in favor of calling this version.

This method has been deprecated since 2.0.0

Please use removeListener on an instance of Ext.Element instead.

Parameters

  • el : String/HTMLElement

    The id or html element from which to remove the listener.

  • eventName : String

    The name of the event.

  • fn : Function

    The handler function to remove. This must be a reference to the function passed into the addListener call.

  • scope : Object

    If a scope (this reference) was specified when the listener was added, then this must refer to the same object.

Ext.EventManager
view source
( el, eventName, fn, scope )deprecated
Removes an event handler from an element. ...

Removes an event handler from an element. Shorthand for removeListener.

This method has been deprecated since 2.0.0

Please use removeListener on an instance of Ext.Element instead.

Parameters

  • el : String/HTMLElement

    The id or html element from which to remove the listener.

  • eventName : String

    The name of the event.

  • fn : Function

    The handler function to remove. This must be a reference to the function passed into the on call.

  • scope : Object

    If a scope (this reference) was specified when the listener was added, then this must refer to the same object.