Properties Methods Events Direct Link

Class Ext.EventObject

Package:Ext
Defined In:EventManager.js
Class:EventObject
Extends:Object
EventObject exposes the Yahoo! UI Event functionality directly on the object passed to your event handler. It exists mostly for convenience. It also fixes the annoying null checks automatically to cleanup your code Example:
function handleClick(e){ // e is not a standard event object, it is a Ext.EventObject
    e.preventDefault();
    var target = e.getTarget();
    ...
 }
 var myDiv = Ext.get("myDiv");
 myDiv.on("click", handleClick);
 //or
 Ext.EventManager.on("myDiv", 'click', handleClick);
 Ext.EventManager.addListener("myDiv", 'click', handleClick);


This class is a singleton and cannot be created directly.

Public Properties

Property Defined By
  BACKSPACE : Number
Key constant
EventObject
  CONTROL : Number
Key constant
EventObject
  DELETE : Number
Key constant
EventObject
  DOWN : Number
Key constant
EventObject
  END : Number
Key constant
EventObject
  ENTER : Number
Key constant
EventObject
  ESC : Number
Key constant
EventObject
  F5 : Number
Key constant
EventObject
  HOME : Number
Key constant
EventObject
  LEFT : Number
Key constant
EventObject
  PAGEDOWN : Number
Key constant
EventObject
  PAGEUP : Number
Key constant
EventObject
  RETURN : Number
Key constant
EventObject
  RIGHT : Number
Key constant
EventObject
  SHIFT : Number
Key constant
EventObject
  SPACE : Number
Key constant
EventObject
  TAB : Number
Key constant
EventObject
  UP : Number
Key constant
EventObject
  altKey : Object
True if the alt key was down during the event
EventObject
  browserEvent : Object
The normal browser event
EventObject
  button : Object
The button pressed in a mouse event
EventObject
  ctrlKey : Object
True if the control key was down during the event
EventObject
  shiftKey : Object
True if the shift key was down during the event
EventObject

Public Methods

Method Defined By

Public Events

This class has no public events.