Skip to content

Instantly share code, notes, and snippets.

@laughinghan
Last active April 20, 2018 23:12
Show Gist options
  • Save laughinghan/38d61fae672a704537d4f5d8284fbb23 to your computer and use it in GitHub Desktop.
Save laughinghan/38d61fae672a704537d4f5d8284fbb23 to your computer and use it in GitHub Desktop.
<p>Expected behavior: in your console you should see "hello" was logged</p>
<p>Observed behavior: in your console you see <code>Uncaught SyntaxError: Unexpected end of input</code> and the corresponding JavaScript that the browser is throwing a syntax error on is <code>console.log('hello')?_=1524265570945</code></p>
<script src="https://code.jquery.com/jquery-2.2.4.js"></script>
<script>
$('body').append('<script src="data:application/javascript,console.log(\'hello\')"></scr'+'ipt>');
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment