Print Friendly

Class Ext.EventManager

Package:Ext
Class:EventManager
Extends:Object
Defined In:EventManager.js
Registers event handlers that want to receive a normalized EventObject instead of the standard browser event and provides several useful events directly. See Ext.EventObject for more details on normalized event objects.

This class is a singleton and cannot be created directly.

Properties   -  Methods   -  Events

Public Properties

Property Defined By
  ieDeferSrc : Object EventManager
Url used for onDocumentReady with using SSL (defaults to Ext.SSL_SECURE_URL)

Public Methods

Method Defined By
  addListener(String/HTMLElement element, String eventName, Function fn, Object options) : void EventManager
Appends an event handler
  onDocumentReady(Function fn, Object scope, boolean options) : void EventManager
Fires when the document is ready (before onload and before images are loaded). Can be accessed shorthanded Ext.onRea...
  onTextResize(Function fn, Object scope, boolean options) : void EventManager
Fires when the user changes the active text size. Handler gets called with 2 params, the old size and the new size.
  onWindowResize(Function fn, Object scope, boolean options) : void EventManager
Fires when the window is resized and provides resize event buffering (50 milliseconds), passes new viewport width and...
  removeListener(String/HTMLElement element, String eventName, Function fn) : Boolean EventManager
Removes an event handler
  removeResizeListener(Function fn, Object scope) : void EventManager
Removes the passed window resize listener.
  wrap(Function fn, Object scope, boolean override) : Function EventManager
Deprecated. This is no longer needed and is deprecated. Places a simple wrapper around an event handler to override t...

Public Events

This class has no public events.

Property Details

ieDeferSrc

public Object ieDeferSrc
Url used for onDocumentReady with using SSL (defaults to Ext.SSL_SECURE_URL)
This property is defined by EventManager.

Method Details

addListener

public function addListener(String/HTMLElement element, String eventName, Function fn, Object options)
Appends an event handler
Parameters:
  • element : String/HTMLElement
    The html element or id to assign the event to
  • eventName : String
    The type of event to append
  • fn : Function
    The method the event invokes
  • options : Object
    An object with standard EventManager options
Returns:
  • void
This method is defined by EventManager.

onDocumentReady

public function onDocumentReady(Function fn, Object scope, boolean options)
Fires when the document is ready (before onload and before images are loaded). Can be accessed shorthanded Ext.onReady().
Parameters:
  • fn : Function
    The method the event invokes
  • scope : Object
    An object that becomes the scope of the handler
  • options : boolean
Returns:
  • void
This method is defined by EventManager.

onTextResize

public function onTextResize(Function fn, Object scope, boolean options)
Fires when the user changes the active text size. Handler gets called with 2 params, the old size and the new size.
Parameters:
  • fn : Function
    The method the event invokes
  • scope : Object
    An object that becomes the scope of the handler
  • options : boolean
Returns:
  • void
This method is defined by EventManager.

onWindowResize

public function onWindowResize(Function fn, Object scope, boolean options)
Fires when the window is resized and provides resize event buffering (50 milliseconds), passes new viewport width and height to handlers.
Parameters:
  • fn : Function
    The method the event invokes
  • scope : Object
    An object that becomes the scope of the handler
  • options : boolean
Returns:
  • void
This method is defined by EventManager.

removeListener

public function removeListener(String/HTMLElement element, String eventName, Function fn)
Removes an event handler
Parameters:
  • element : String/HTMLElement
    The id or html element to remove the event from
  • eventName : String
    The type of event
  • fn : Function
Returns:
  • Boolean
    True if a listener was actually removed
This method is defined by EventManager.

removeResizeListener

public function removeResizeListener(Function fn, Object scope)
Removes the passed window resize listener.
Parameters:
  • fn : Function
    The method the event invokes
  • scope : Object
    The scope of handler
Returns:
  • void
This method is defined by EventManager.

wrap

public function wrap(Function fn, Object scope, boolean override)
Deprecated. This is no longer needed and is deprecated. Places a simple wrapper around an event handler to override the browser event object with a Ext.EventObject
Parameters:
  • fn : Function
    The method the event invokes
  • scope : Object
    An object that becomes the scope of the handler
  • override : boolean
    If true, the obj passed in becomes the execution scope of the listener
Returns:
  • Function
    The wrapped function
This method is defined by EventManager.

Ext - Copyright © 2006-2007 Ext JS, LLC
All rights reserved.