Skip to content

Instantly share code, notes, and snippets.

@j-
Created November 24, 2021 04:11
Show Gist options
  • Save j-/58464ed64cebf78301dc4c7bf449df5b to your computer and use it in GitHub Desktop.
Save j-/58464ed64cebf78301dc4c7bf449df5b to your computer and use it in GitHub Desktop.
{
const iframe = document.createElement('iframe');
iframe.src = 'data:text/html,';
document.body.appendChild(iframe);
const guestWin = iframe.contentWindow;
const guestWinKeys = Object.keys(guestWin);
const hostWinKeys = Object.keys(window);
const diff = hostWinKeys.filter((key) => {
return !guestWinKeys.includes(key);
}).sort();
document.body.removeChild(iframe);
diff;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment