Created
October 24, 2018 11:06
-
-
Save srod/c1484b8d3ae8734314b8602db17cdc80 to your computer and use it in GitHub Desktop.
List Globals Vars
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
(function(){ | |
var iframe = document.createElement('iframe'); | |
iframe.src = 'about:blank'; | |
document.body.appendChild(iframe); | |
var windowVars = Object.keys(iframe.contentWindow); | |
var globalVars = Object.keys(window).filter(key => !windowVars.includes(key)); | |
console.log('global Vars:', globalVars); | |
document.body.removeChild(iframe); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment