Created
March 17, 2020 23:37
-
-
Save MatthiasPortzel/35e4bae2fa3efc46b73fb1ce463d8ab0 to your computer and use it in GitHub Desktop.
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 getAbnormalProps () { | |
var f = document.createElement("iframe"); | |
f.src = "about:blank"; | |
document.body.appendChild(f); | |
var normalProps = Object.keys(f.contentWindow); | |
var result = {}; | |
Object.keys(window).filter(p => !normalProps.includes(p)).forEach(p => { result[p] = window[p]; }); | |
document.body.removeChild(f); | |
return result; | |
} | |
getAbnormalProps(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment