Created
December 4, 2014 16:32
-
-
Save WolfieZero/73653aa14146a2442411 to your computer and use it in GitHub Desktop.
Is content in a (i)frame
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) ? true : false) { | |
// in (i)frame | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(window.top !== window.self) is even safer :)