Created
June 13, 2020 15:11
-
-
Save geomago/351013cbb40dca2733034301b2abfbd6 to your computer and use it in GitHub Desktop.
undeclared_js_vars_step_1
This file contains hidden or 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
glob = {}; // global object to keep the initial list of properties | |
glob.before = Object.keys(window); // save all window properties before any script is loaded | |
// showDiff shows (on console.log) the list of "new" properties | |
glob.showDiff = function(before,after) { | |
for (let p in after) { | |
if (before[p] === undefined) { | |
console.log(p,': ', after[p], ' = ', window[p]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment