Skip to content

Instantly share code, notes, and snippets.

@anthonybrown
Created January 17, 2018 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anthonybrown/6541e0d6c8241e6c03eb8325dc188714 to your computer and use it in GitHub Desktop.
Save anthonybrown/6541e0d6c8241e6c03eb8325dc188714 to your computer and use it in GitHub Desktop.
Log new objects in the console
{
const iframe = document.createElement('iframe');
document.body.append(iframe);
const virgin = Object.keys(iframe.contentWindow);
const current = Object.keys(window);
const added = current.filter(key => !virgin.includes(key));
console.log(added);
}
@anthonybrown
Copy link
Author

Disclaimer, this was written by Wes Bos not me. It's from a tweet I read this morning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment