stomp client: no way of using SharedWorkers without creating a mess. It is sad...
authorgustavo <gu.martinm@gmail.com>
Mon, 29 Aug 2016 01:46:13 +0000 (03:46 +0200)
committergustavo <gu.martinm@gmail.com>
Mon, 29 Aug 2016 01:46:13 +0000 (03:46 +0200)
angularjs/stomp/src/stomp/app/shared-stomp/shared-worker.service.js

index fdc0988..b6cbe1f 100644 (file)
@@ -43,7 +43,7 @@
       if (!$window.SharedWorker) {
         throw new Error('Shared Web Workers not supported. Try with a modern browser');
       }
-      var sharedWorker = makeSharedWorker($window);
+      var sharedWorker = makeWorker($window);
       _messagePort = sharedWorker.port;
       _messagePort.onmessage = onMessage;
     }
     }
   }
 
-  function makeSharedWorker($window) {
+  /**
+   * @ngdoc method
+   * @name  makeWorker
+   * @methodOf app.shared-stomp.makeWorker
+   *
+   * @description
+   * Creates WORKER. IT DOES NOT WORK WITH SHARED WORKERS!!!! NO WAY OF USING SHARED WORKERS
+   * IN A PAINLESS WAY!!!! SO, THIS APPLICATION DOES NOT WORK YET WITH SHARED WORKERS :(
+   *
+   * @param {object} $window
+   *
+   */
+  function makeWorker($window) {
     var sharedWorkerName = 'shared-stomp';
     var sharedWorker;