Skip to content

Instantly share code, notes, and snippets.

@dperini
Created July 14, 2009 18:31
Show Gist options
  • Save dperini/147103 to your computer and use it in GitHub Desktop.
Save dperini/147103 to your computer and use it in GitHub Desktop.
/* can you spot what is happening here */
/* the alert("X") should never execute */
<script>
onload = function() {
var fn = function() {
alert("X");
}
(function() { })();
}
</script>
@unscriptable
Copy link

Nice one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment