Skip to content

Instantly share code, notes, and snippets.

@0xBADC0FFEE
Last active December 23, 2015 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0xBADC0FFEE/6614249 to your computer and use it in GitHub Desktop.
Save 0xBADC0FFEE/6614249 to your computer and use it in GitHub Desktop.
(function() {
"use strict";
function loadJSAsync() {
var js = document.createElement("script");
js.type = "text/javascript";
js.src = "script.js";
js.async = true;
// insert the "js" script tag to the DOM here ...
}
if (window.attachEvent) {
window.attachEvent("onload", loadJSAsync);
} else {
window.addEventListener("load", loadJSAsync, false);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment