Skip to content

Instantly share code, notes, and snippets.

@MatthiasPortzel
Created March 17, 2020 23:37
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 MatthiasPortzel/35e4bae2fa3efc46b73fb1ce463d8ab0 to your computer and use it in GitHub Desktop.
Save MatthiasPortzel/35e4bae2fa3efc46b73fb1ce463d8ab0 to your computer and use it in GitHub Desktop.
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