Is it true that JavaScript does not support multithreading? I am seeking expert advice on a specific scenario.
I need to make an AJAX call and upon successful completion, trigger a set of events to update different parts of the UI simultaneously.
- Would using a Subscribe/Publish pattern allow me to have multiple listeners for the AJAX completion event?
If so, how are these listeners notified when published? Is it done in a multithreaded way or one by one?
Please suggest the best approach to achieve this. Your insights would be greatly valued.
EDIT::
I am aware that popular frameworks like JQuery support this pattern. However, I need to create this functionality from scratch due to our own framework constraints.