Created
January 15, 2015 13:17
-
-
Save ewebdev/239c17e297e789f1effa to your computer and use it in GitHub Desktop.
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 globals = [], | |
pageProps = {}, | |
nativeProps = {}, | |
v; | |
for (v in window) { | |
pageProps[v] = 1; | |
} | |
var ifrm = document.createElement("IFRAME"); | |
document.body.appendChild(ifrm); | |
var iWin = ifrm.contentWindow; | |
for (v in iWin) { | |
nativeProps[v] = 1; | |
} | |
for (v in pageProps) { | |
if (pageProps.hasOwnProperty(v) && !nativeProps.hasOwnProperty(v)){ | |
globals.push(v); | |
} | |
} | |
document.body.removeChild(ifrm); | |
return globals.sort(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment