Created
November 30, 2012 13:23
-
-
Save remy/4175723 to your computer and use it in GitHub Desktop.
How to hang JavaScript (useful - to me - for slowing down code and testing)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hang(n) { | |
var x = new XMLHttpRequest(); | |
x.open('GET', 'http://hang.nodester.com/script.js?' + n, false); | |
x.send(); | |
} | |
// usage: hang(2 * 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is cool, ha.