I think the web worker is a good design for GUI applications such as web browser. The workers do heavy work and provide the results to the UI thread. The UI thread only displays the result and responds to user input events which makes good user responsiveness.

The web workers run in other context. They can’t access data in the UI thread. They can only communicate with the UI thread by calling some limited APIs.

See: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers