Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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