Skip to content

Instantly share code, notes, and snippets.

@benmills
Created July 26, 2013 21:39
Show Gist options
  • Save benmills/6092436 to your computer and use it in GitHub Desktop.
Save benmills/6092436 to your computer and use it in GitHub Desktop.
window.onload = function () {
var loadScript = function (scriptUrl, callback) {
var script = document.createElement("script");
script.src = scriptUrl;
script.onload = callback;
document.body.appendChild(script);
};
loadScript("http://localhost:3002/a.js", function () {
loadScript("http://localhost:3002/b.js", function () {
console.log(A());
console.log(B());
});
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment