Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web worker inside Web worker possible?

im trying to spawn a web worker inside a web worker but im getting this error:

mainWorker.js:92 Uncaught ReferenceError: Worker is not defined

using this code:

var worker = new Worker('subWorker.js');
worker.postMessage(......);

is this possible in some way??

like image 227
Vanojx1 Avatar asked Sep 23 '16 16:09

Vanojx1


1 Answers

For anyone who stumbles here, nested workers now have some support in Chrome at least: https://www.chromestatus.com/feature/6080438103703552:

Dedicated workers can create nested workers, but shared workers and service workers cannot.

Creating a nested dedicated worker from a shared worker is not yet supported.

Nested shared workers are also in the spec, but there is no plan to support them at this time.

like image 200
see sharper Avatar answered Sep 29 '22 10:09

see sharper