Skip to content

Instantly share code, notes, and snippets.

@samosad
Created June 25, 2015 09:47
Show Gist options
  • Save samosad/292a2e1d4fed14a88739 to your computer and use it in GitHub Desktop.
Save samosad/292a2e1d4fed14a88739 to your computer and use it in GitHub Desktop.
isInFrame
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