Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a small event handler usage report utility

  • Loading branch information...
commit 83b3be1ab8c5683e5b7a50b2905490a47283b8cb 1 parent 677ab6c
Juriy Zaytsev authored
Showing with 17 additions and 0 deletions.
  1. +17 −0 event_cache_buster.js
17 event_cache_buster.js
View
@@ -0,0 +1,17 @@
+(function(c, total){
+ console.group('Events cache');
+ for (var p in c) {
+ var handlers = Object.keys(c[p]).without('element'),
+ el = Object.inspect(c[p].element), len;
+ console.group(el);
+ console.log(handlers.inject([], function(a,h) {
+ len = c[p][h].length;
+ a.push(h + (len>1 ? (' ('+len+')') : '') + '\n');
+ total += len;
+ return a;
+ }).join(''));
+ console.groupEnd(el);
+ }
+ console.groupEnd('Event cache');
+ console.log('Total: ', total);
+})(Event.cache, 0);
Please sign in to comment.
Something went wrong with that request. Please try again.