Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add a class to the html tag if the page is being loaded in an iframe
if (window.location !== window.parent.location) {
document.documentElement.className += ' iframe';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment