Skip to content

Instantly share code, notes, and snippets.

@phiggins42
Created April 6, 2011 13:35
Show Gist options
  • Save phiggins42/905640 to your computer and use it in GitHub Desktop.
Save phiggins42/905640 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>Dojo x-domain Skeleton</title>
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js"></script>
<script>
dojo.require("dojo.DeferredList");
dojo.ready(function(){
var xhrs = dojo.map(["dfdlist.html", "dfdlist.html", "dfdlist.html", "dfdlist.html", "dfdlist.html"], function(url){
return dojo.xhrGet({ url: url })
})
new dojo.DeferredList(xhrs).addCallback(function(responses){
// arguments are a list of response datas and such:
console.log("all " + responses.length + " dfd's are done", arguments);
});
});
</script>
</head>
<body class="claro">
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment