From: gustavo Date: Mon, 29 Aug 2016 01:46:13 +0000 (+0200) Subject: stomp client: no way of using SharedWorkers without creating a mess. It is sad... X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=4da72236beffa9ccfd0037bb556c76dbe4d69233;p=JavaScriptForFun stomp client: no way of using SharedWorkers without creating a mess. It is sad... --- diff --git a/angularjs/stomp/src/stomp/app/shared-stomp/shared-worker.service.js b/angularjs/stomp/src/stomp/app/shared-stomp/shared-worker.service.js index fdc0988..b6cbe1f 100644 --- a/angularjs/stomp/src/stomp/app/shared-stomp/shared-worker.service.js +++ b/angularjs/stomp/src/stomp/app/shared-stomp/shared-worker.service.js @@ -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; } @@ -155,7 +155,19 @@ } } - 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;