Skip to content

Instantly share code, notes, and snippets.

@saikat
Created October 28, 2009 20:17
Show Gist options
  • Save saikat/220791 to your computer and use it in GitHub Desktop.
Save saikat/220791 to your computer and use it in GitHub Desktop.
+ (void)bootstrap
{
#if PLATFORM(DOM)
var body = document.getElementsByTagName("body")[0];
// Hack to keep white screen from appearing
body.innerHTML = "<div id=\"Loading\" style=\" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;\"><div style=\"margin:auto auto; width: 440px; padding: 10px 25px 10px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; top: 50px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555\"><p style=\"line-height: 1.4em;\">Just a few more seconds while we initialize everything...</p></div></div>"; // Get rid of anything that might be lingering in the body element.
body.style.overflow = "hidden";
if (document.documentElement)
document.documentElement.style.overflow = "hidden";
#endif
[CPPlatformString bootstrap];
[CPPlatformWindow setPrimaryPlatformWindow:[[CPPlatformWindow alloc] _init]];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment