Created
April 5, 2011 16:41
-
-
Save bpletzer/903966 to your computer and use it in GitHub Desktop.
this example depends on writeCapture.js and jquery.writeCapture.js which can be found https://github.com/iamnoah/writeCapture it shows, that writeCapture stops working as soon one calls a js which cannot be found on another domain it works locally.
This file contains hidden or 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" xml:lang="en" lang="en" | |
dir="ltr" id="html"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>404 different domain</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script> | |
<script src="writeCapture.js" type="text/javascript" charset="utf-8"></script> | |
<script src="jquery.writeCapture.js" type="text/javascript" charset="utf-8"></script> | |
</head> | |
<body> | |
<h1>404 different domain</h1> | |
<div id="one"></div> | |
<div id="two"></div> | |
<div id="control"></div> | |
<script type="text/javascript"> | |
var one = '<scr'+'ipt src="http://www.google.de/404/one.js" type="text/javascript" charset="utf-8"></scr'+'ipt>'; | |
$('#one').writeCapture().html(one); | |
var two = '<scr'+'ipt src="two.js" type="text/javascript" charset="utf-8"></scr'+'ipt>'; | |
$('#two').writeCapture().html(two); | |
$('#control').html('js works'); | |
</script> | |
<div id="footer">fin</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment