Skip to content

Instantly share code, notes, and snippets.

@gmaclennan
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gmaclennan/520b8ccf857a36db5cf3 to your computer and use it in GitHub Desktop.
Save gmaclennan/520b8ccf857a36db5cf3 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<meta charset="utf-8">
<body>
Should show an error below <br><br>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
d3.xhr('http://example.com/missing_file.jpg')
.responseType('blob')
.get(function(err, xhr) {
document.body.appendChild(document.createTextNode(err + ""));
});
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment