Shared Web Workers: Basic Example

To create a shared Web Worker, you pass a JavaScript file name to a new instance of the SharedWorker object:
var worker = new SharedWorker("jsworker.js");
Our web shared Web Worker will count the connection and return the data back to our listener in this page. You might want to open the Chrome DevTools in order to see the process.