Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Load a script manually with "async" attribute
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = 'http://yourdomain.com/script.js';
var x = document.getElementsByTagName('script')[0];
x.parentNode.insertBefore(s, x);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment