Skip to content

Instantly share code, notes, and snippets.

@JordanMilne
Created September 6, 2013 03:52
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 JordanMilne/6459317 to your computer and use it in GitHub Desktop.
Save JordanMilne/6459317 to your computer and use it in GitHub Desktop.
Demonstrates abuse of script error handling
<html>
<body>
<script src="http://google.com" onload="javascript:alert('google loaded')" onerror="javascript:alert('google failed')"></script>
<script src="http://doesntexist.example.com" onload="javascript:alert('universe exploded')" onerror="javascript:alert('doesntexist failed to load as expected')"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment