Skip to content

Instantly share code, notes, and snippets.

@robcolburn
Created May 30, 2014 21: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 robcolburn/33613fafd8f14cf4edfc to your computer and use it in GitHub Desktop.
Save robcolburn/33613fafd8f14cf4edfc to your computer and use it in GitHub Desktop.
script.onload = then;
script.onreadystatechange = function () {
if (/loaded|complete/.test(script.readyState)) {
script.onreadystatechange = null;
then();
}
};
function then () {
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment