10 ms·
It's true! I tested it because I thought it would be possible to just wait for readyState == 4 in a loop. My assumption was that XMLHttpRequest runs in another
by lolc 6y ago
It's true! I tested it because I thought it would be possible to just wait for readyState == 4 in a loop. My assumption was that XMLHttpRequest runs in another thread once you do send() on it. And indeed, the request starts immediately. But the instance of XMLHttpRequest doesn't get updated until control is yielded. So you can't get the goods. All considered, that is a good thing :-)