Skip to content

Instantly share code, notes, and snippets.

@shlevy
Created February 15, 2012 02:07
Show Gist options
  • Select an option

  • Save shlevy/1832527 to your computer and use it in GitHub Desktop.

Select an option

Save shlevy/1832527 to your computer and use it in GitHub Desktop.
Run init() at start
if (document.readyState === "complete") {
init();
} else {
document.addEventListener("load", { handleEvent: init });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment