First of all: LOL! I finally realized you thought I meant that you, personally, had to be patient! Not at all; just meant that the *CODE* had to be patient! DOH on me.
code). So *THAT* component is capable of multithreading. And doing I/O. And releasing control until it receives a response from the server. And, finally, calling *BACK* into your JS
code when the answer arrives.
code stops greedily holding onto the single thread--even if it just relinquishes its hold by doing a setTimeout [and yes, even with a zero-time timeout]--then *WHAM*, that event is allowed to actually invoke the JS
code and you get the data in your JS
Make more sense?