From 4da72236beffa9ccfd0037bb556c76dbe4d69233 Mon Sep 17 00:00:00 2001 From: gustavo Date: Mon, 29 Aug 2016 03:46:13 +0200 Subject: [PATCH] stomp client: no way of using SharedWorkers without creating a mess. It is sad... --- .../src/stomp/app/shared-stomp/shared-worker.service.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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; -- 2.1.4