Skip to content

Instantly share code, notes, and snippets.

@FLasH3r
Forked from revolunet/extjs-capture.js
Created June 12, 2013 10:55
Show Gist options
  • Save FLasH3r/5764371 to your computer and use it in GitHub Desktop.
Save FLasH3r/5764371 to your computer and use it in GitHub Desktop.
// to capture ALL events use:
Ext.util.Observable.prototype.fireEvent =
Ext.util.Observable.prototype.fireEvent.createInterceptor(function() {
console.log(this.name);
console.log(arguments);
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