Skip to content

Instantly share code, notes, and snippets.

@Thinkscape
Forked from inakiabt/extjs-capture.js
Created July 17, 2012 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Thinkscape/3128769 to your computer and use it in GitHub Desktop.
Save Thinkscape/3128769 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,this.$className + ' 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