Skip to content

Instantly share code, notes, and snippets.

@VarunBatraIT
Created May 7, 2018 12:37
Show Gist options
  • Save VarunBatraIT/d6bd93dedc434d5390cca631e65a612d to your computer and use it in GitHub Desktop.
Save VarunBatraIT/d6bd93dedc434d5390cca631e65a612d to your computer and use it in GitHub Desktop.
Array.from(document.querySelectorAll('*'))
.reduce(function(pre, dom){
var evtObj = getEventListeners(dom)
Object.keys(evtObj).forEach(function (evt) {
if (typeof pre[evt] === 'undefined') {
pre[evt] = 0
}
pre[evt] += evtObj[evt].length
})
return pre
}, {})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment