Created
July 17, 2014 18:43
-
-
Save mmirolim/8dc492c0aab96f56e810 to your computer and use it in GitHub Desktop.
Test if in iframe
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
if ( window.location !== window.parent.location ) { | |
// The page is in an iframe | |
} else { | |
// The page is not in an iframe | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment