Last active
December 12, 2015 00:38
-
-
Save stanwilsonjr/4684779 to your computer and use it in GitHub Desktop.
iframed Modernizr test
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
// This will add a class to the html tag if it is iframed | |
// https://github.com/Modernizr/Modernizr/commit/d48a2bf1b18b891c5647dcfca9cb2713688ccec2 | |
<script type="text/javascript"> | |
Modernizr.addTest('framed', function(){ | |
return window.location != top.location; | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment