Created
June 25, 2015 09:47
-
-
Save samosad/292a2e1d4fed14a88739 to your computer and use it in GitHub Desktop.
isInFrame
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
var isInFrame = function() { | |
try { | |
return window.self !== window.top; | |
} catch (error) { | |
return true; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment