Skip to content

Instantly share code, notes, and snippets.

@inakiabt
Forked from revolunet/extjs-capture.js
Created March 20, 2012 22:42
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save inakiabt/2142051 to your computer and use it in GitHub Desktop.
Save inakiabt/2142051 to your computer and use it in GitHub Desktop.
ExtJs debug : capture all events
// to capture ALL events use:
Ext.util.Observable.prototype.fireEvent = Ext.Function.createInterceptor(Ext.util.Observable.prototype.fireEvent, function(evt) {
var a=arguments;
console.log(this,' fired event ',evt,' with args ',Array.prototype.slice.call(a,1,a.length));
return true;
});
// to capture events for a particular component:
Ext.util.Observable.capture(
Ext.getCmp('my-comp'),
function(e) {
console.info(e);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment