How to run EventSource inside Shared Worker?
问题 I implemented server-sent events to receive messages from the server. I describe how I implemented it on another question Now I am trying to run it inside a shared worker to prevent the user from opening multiple connections to the servers via multiple browser tabs. Here is what I have done to run the code inside a Shared Worker created a file calles worker.js and I put this code inside of it self.addEventListener('getMessagingQueue', function (event) { console.log('Listener is Available');