PDA

View Full Version : Capturing all events



klodoma1
22 Aug 2012, 1:11 PM
Hi,

For debugging purposes with extjs4 I use the following to capture all events.
This might be helpful for some people, though it's a good "console flooding" method :)

It fulfills my requirements, but I do wonder if it's complete...




Ext.util.Observable.prototype.fireEvent =
Ext.Function.createInterceptor(Ext.util.Observable.prototype.fireEvent, function() {
console.log(this.$className, arguments, this);
return true;
});


Ext.Component.prototype.fireEvent =
Ext.Function.createInterceptor(Ext.Component.prototype.fireEvent, function() {
console.log(this.$className, arguments, this);
return true;
});

klodoma1
22 Aug 2012, 1:12 PM
If you consider inappropriate in Q/A, please move the thread to discussions or so.