Created
August 3, 2020 18:55
-
-
Save wildeyes/106d7b6e49714aea1d56ccb72bf2ec59 to your computer and use it in GitHub Desktop.
Catch all events from iframe
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
// https://www.thetopsites.net/article/50469550.shtml | |
Object.keys(window).forEach(key => { | |
if (/^on/.test(key)) { | |
window.addEventListener(key.slice(2), event => { | |
console.log(event); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment