Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crongro/327cbfe18add65a9c0c3 to your computer and use it in GitHub Desktop.
Save crongro/327cbfe18add65a9c0c3 to your computer and use it in GitHub Desktop.
사용자정의 Global variables 확인 방법
// 초기 코드에서 이걸 계산.
this.__d = [];
for (i in window) {
this.__d.push(i);
}
//나중에 이 메소드를 실행
(function(win){
var __result = "";
console.log(win.__d);
for (i in win) {
if(win.__d.indexOf(i) < 0) {
__result += "\n" + i;
}else{
}
}
console.log("[user defined Global variables]\n" , __result);
})(window);
@crongro
Copy link
Author

crongro commented Jun 11, 2014

Object.keys( window );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment