Created
October 23, 2012 18:01
-
-
Save gcpantazis/3940373 to your computer and use it in GitHub Desktop.
Example of In-App Init Prevention.
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
// In your actual app's JS, do not initialize if site is iframed. | |
require(['app-global'], function(AppGlobal) { | |
if ( top !== self ) { | |
return; | |
} | |
// Otherwise | |
AppGlobal.init(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment