Skip to content

Instantly share code, notes, and snippets.

@arestov
Created September 6, 2011 10:01
Show Gist options
  • Save arestov/1197164 to your computer and use it in GitHub Desktop.
Save arestov/1197164 to your computer and use it in GitHub Desktop.
async document.write()
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
<head>
<title>js test</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
</head>
<body>
<script type="text/javascript">
var p = (function(){var srs = document.getElementsByTagName('script'); srs = srs[srs.length-1]; return srs})();
var script = document.createElement('script');
script.src="http://code.jquery.com/jquery-1.6.2.min.js"
p.parentNode.insertBefore(script, p.nextSibling)
</script>
<script type="text/javascript">
console.log(typeof $); //undefined
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment