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
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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