Created
December 28, 2011 15:49
-
-
Save anonymous/1528436 to your computer and use it in GitHub Desktop.
Listing 3.3 The script include snippet with separately-defined.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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"> | |
<head> | |
<title></title> | |
<script src="./Scripts/jquery-1.4.4.min.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<p>page starts rendering</p> | |
<p>script is loading asynchronously ... (in all browsers)</p> | |
<script type="text/javascript"> | |
(function () { | |
var script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.async = true; | |
script.src = 'http://widget.dev/ThirdPartyjavascript/js/BlockingWidget' | |
var entry = document.getElementsByTagName('script')[0]; | |
entry.parentNode.insertBefore(script, entry); | |
} ()); | |
</script> | |
<h1>Welcome</h1> | |
<div data-stork-product="1337" /> | |
<hr /> | |
<div data-stork-product="2012" /> | |
<hr /> | |
<p>page has finished rendering</p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment