Skip to content

Instantly share code, notes, and snippets.

@nuxodin nuxodin/custom_globals.js

Last active Aug 31, 2018
What would you like to do?
Find custom globals variables
const iframe = document.createElement('iframe');
setTimeout(()=>{ // wait some time until chrome adds console-accessible properties to the iframe too
const customNames = Object.getOwnPropertyNames(window).filter(item => !(item in iframe.contentWindow) );
const object = Object.create(null);
customNames.forEach(name => object[name] = window[name] )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.