Skip to content

Instantly share code, notes, and snippets.

@insin
Forked from jcoglan/timeout.html
Last active December 27, 2015 16:49
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 insin/7357379 to your computer and use it in GitHub Desktop.
Save insin/7357379 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'
setTimeout
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>
@insin
Copy link
Author

insin commented Nov 7, 2013

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