Last active
April 16, 2018 04:19
-
-
Save kardysm/cc163a1db1cac7fc411e6b33591ed55a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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