Created
November 5, 2015 13:09
-
-
Save xk/22f7d78ec4353e0149b6 to your computer and use it in GitHub Desktop.
Muestra las variables globales
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 buscarVariablesGlobales (dirtySet, cleanSet) { | |
//© 2013-02-19 jorge@jorgechamorro.com | |
dirtySet= document.body.appendChild(document.createElement('iframe')); | |
cleanSet= Object.getOwnPropertyNames(dirtySet.contentWindow); | |
dirtySet.parentNode.removeChild(dirtySet); | |
dirtySet= Object.getOwnPropertyNames(function () { return this }()); | |
return dirtySet.filter(function (v,i,o) { return cleanSet.indexOf(v) < 0 }); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment