Skip to content

Instantly share code, notes, and snippets.

@kardysm
Last active April 16, 2018 04:19
Show Gist options
  • Save kardysm/cc163a1db1cac7fc411e6b33591ed55a to your computer and use it in GitHub Desktop.
Save kardysm/cc163a1db1cac7fc411e6b33591ed55a to your computer and use it in GitHub Desktop.
const listDeepEventListeners = (elem) => {
listEventListeners(elem);
Array.from(elem.children).map(function(item){
listEventListeners(item)
listDeepEventListeners(item);
})
};
const listEventListeners = (elem) => {
const listeners = getEventListeners(elem)
if(Object.keys(listeners).length){
console.log(listeners, elem);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment