/* This file is part of Ext JS 3.4 Copyright (c) 2011-2013 Sencha Inc Contact: http://www.sencha.com/contact GNU General Public License Usage This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html. If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. Build date: 2013-04-03 15:07:25 */ Ext.data.JsonP.Ext_EventObject({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":null,"uses":[],"html":"
Files
Just as Ext.Element wraps around a native DOM node, Ext.EventObject\nwraps the browser's native event-object normalizing cross-browser differences,\nsuch as which mouse button is clicked, keys pressed, mechanisms to stop\nevent-propagation along with a method to prevent default actions from taking place.
\n\nFor example:
\n\n\nfunction handleClick(e, t){ // e is not a standard event object, it is a Ext.EventObject\n e.preventDefault();\n var target = e.getTarget(); // same as t (the target HTMLElement)\n ...\n}\nvar myDiv = Ext.get(\"myDiv\"); // get reference to an Ext.Element\nmyDiv.on( // 'on' is shorthand for addListener\n \"click\", // perform an action on click of myDiv\n handleClick // reference to the action handler\n);\n// other methods to do the same:\nExt.EventManager.on(\"myDiv\", 'click', handleClick);\nExt.EventManager.addListener(\"myDiv\", 'click', handleClick);\n
\n\nGets the related target.
\nGets the target for the event.
\nA simple selector to filter the target or look for an ancestor of the target
\nThe max depth to
\n\n search as a number or element (defaults to 10 || document.body)\n
\n\n@param {Boolean} returnEl (optional) True to return a Ext.Element object instead of DOM node
\nPrevents the browsers default handling of the event.
\nStop the event (preventDefault and stopPropagation)
\nReturns true if the target of this event is a child of el. Unless the allowEl parameter is set, it will return false if if the target is el.\nExample usage:
\n\n // Handle click on any child of an element\n Ext.getBody().on('click', function(e){\n if(e.within('some-el')){\n alert('Clicked on a child of some-el!');\n }\n });\n\n // Handle click directly on an element, ignoring clicks on child nodes\n Ext.getBody().on('click', function(e,t){\n if((t.id == 'some-el') && !e.within(t, true)){\n alert('Clicked directly on some-el!');\n }\n });\n
\n\n\n@param {Mixed} el The id, DOM element or Ext.Element to check
\ntrue to test if the related target is within el instead of the target
\ntrue to also check if the passed element is the target or related target
\n