Skip to content

Instantly share code, notes, and snippets.

@wildeyes
Created August 3, 2020 18:55
Show Gist options
  • Save wildeyes/106d7b6e49714aea1d56ccb72bf2ec59 to your computer and use it in GitHub Desktop.
Save wildeyes/106d7b6e49714aea1d56ccb72bf2ec59 to your computer and use it in GitHub Desktop.
Catch all events from iframe
// 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