aka:JavaScript:EventModel
- ECMA262 doesn't define any event model including event loops.
- Each host environment its own event model.
- Event loops are popular.
- On both the browser and the server, JavaScript’s de-facto concurrency model is increasingly “shared nothing” communicating event loops. JavaScript event loops within the browser (both frames and workers) send asynchronous messages to other JavaScript event loops via postMessage.
- JavaScript event loops in the browser send and receive asynchronous messages with servers using asynchronous XHR, and shortly, Server-Sent Events and WebSockets.
- Server-side JavaScript has a rapidly growing role as the counter party of these protocols, and increasingly uses event loops to service them.