Web Workers also support Channel Messaging. Channel Messaging can be used to enable direct communication between workers. In this example, the UI thread creates two workers and a set of ports through which the Web Workers can directly communicate. The UI thread then passes the string "Hello World" to the first Web Worker, which passes it on to the second Web Worker via the specified port, which then passes it back to the UI thread.

Message Log: