Created
January 19, 2017 04:16
-
-
Save lovemyliwu/1a033f577f80356c7fbb2e1cf1c73baf to your computer and use it in GitHub Desktop.
列出window对象新增的属性
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
// 准备一份干净的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