Created
June 4, 2014 15:36
-
-
Save bendman/74f2b5ec66889c5466ce to your computer and use it in GitHub Desktop.
Check if the current frame has access to the top 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
var crossDomain = (function(){ | |
var top = null; | |
try { | |
top = window.top.location.host; | |
} catch(err) {} | |
return (top === null); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment