Skip to content

Instantly share code, notes, and snippets.

@lovemyliwu
Created January 19, 2017 04:16
Show Gist options
  • Save lovemyliwu/1a033f577f80356c7fbb2e1cf1c73baf to your computer and use it in GitHub Desktop.
Save lovemyliwu/1a033f577f80356c7fbb2e1cf1c73baf to your computer and use it in GitHub Desktop.
列出window对象新增的属性
// 准备一份干净的window对象属性列表,例如新打开一个tab,在console里运行如下命令
originItems = Object.keys(window);
// 在你想分析的页面的console里同样取得包含新增属性的window对象属性列表
completeItems = Object.keys(window);
// 过滤出来
completeItems.filter((item) = > {return originItems.indexOf(item) == -1;});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment