Skip to content

Instantly share code, notes, and snippets.

@jcoglan
Created November 7, 2013 16:00
Show Gist options
  • Save jcoglan/7357018 to your computer and use it in GitHub Desktop.
Save jcoglan/7357018 to your computer and use it in GitHub Desktop.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>test</title>
</head>
<body>
<script>
// alerts 'fake' then 'real'
var st = window.setTimeout
window.setTimeout = function() { alert('fake') }
setTimeout(function() { alert('real') }, 100)
window.setTimeout = st
setTimeout(function() { alert('real') }, 100)
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment