X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..e9397f91ede62d446aed37d23256e8938fc4c335:/docs/output/Ext.EventObject.html?ds=inline diff --git a/docs/output/Ext.EventObject.html b/docs/output/Ext.EventObject.html index aca6ae9e..bd62eaf5 100644 --- a/docs/output/Ext.EventObject.html +++ b/docs/output/Ext.EventObject.html @@ -1,4 +1,4 @@ -
Properties Methods Events Direct Link

Class Ext.EventObject

Package:Ext
Defined In:EventManager.js
Class:EventObject
Extends:Object
Just as Ext.Element wraps around a native DOM node, Ext.EventObject +

Class Ext.EventObject

Package:Ext
Defined In:EventManager.js
Class:EventObject
Extends:Object
Just as Ext.Element wraps around a native DOM node, Ext.EventObject wraps the browser's native event-object normalizing cross-browser differences, such as which mouse button is clicked, keys pressed, mechanisms to stop event-propagation along with a method to prevent default actions from taking place. @@ -12,7 +12,7 @@ event-propagation along with a method to prevent default actions from taking pla myDiv.on( // 'on' is shorthand for addListener "click", // perform an action on click of myDiv handleClick // reference to the action handler -); +); // other methods to do the same: Ext.EventManager.on("myDiv", 'click', handleClick); Ext.EventManager.addListener("myDiv", 'click', handleClick);

This class is a singleton and cannot be created directly.

Public Properties

This class has no public properties.

Public Methods

MethodDefined By

Public Events

This class has no public events.
\ No newline at end of file + Ext.getBody().on('click', function(e){ + if(e.within('some-el')){ + alert('Clicked on a child of some-el!'); + } + }); + + // Handle click directly on an element, ignoring clicks on child nodes + Ext.getBody().on('click', function(e,t){ + if((t.id == 'some-el') && !e.within(t, true)){ + alert('Clicked directly on some-el!'); + } + });
Parameters:
  • el : Mixed
    The id, DOM element or Ext.Element to check
  • related : Boolean
    (optional) true to test if the related target is within el instead of the target
  • allowEl : Boolean
    {optional} true to also check if the passed element is the target or related target
Returns:
  • Boolean
EventObject

Public Events

This class has no public events.
\ No newline at end of file