Are web workers allowed to have Web Worker threads?

This is similar to Firefox 3.5+, where I can create an instance of a web worker, and inside the worker I can create another thread. However, the code will not work in Google Chrome, so I believe that it is either a Mozilla proprietary extension for the specification, or that Chrome did not fully comply with the specification. So what is this?

+4
source share
2 answers

http://www.whatwg.org/specs/web-workers/current-work/#interface-objects-and-constructors it seems that MAY is possible (as of 10/21/2009):

"In the global scripting area, whose global script object is not a WorkerGlobalScope object, there should be no interface objects and constructors, except for the following: [...] Worker and SharedWorker interface objects and constructors."

Here

  • "globally scripted, the global script object is a WorkerGlobalScope object" means "among work globals"
  • "must not be ... except" open to interpretation.

You might want to find open questions / send feedback. The specification has this text:

To send feedback: whatwg@whatwg.org To view and vote on feedback: http://www.whatwg.org/issues/ 
+3
source

Yes, web workers can spawn sub-users. Major newer browsers support the web interface.

Here are some guides to get it.

https://developer.mozilla.org/en-US/docs/DOM/Using_web_workers

https://developer.mozilla.org/en-US/docs/DOM/Worker/Functions_available_to_workers

+1
source

All Articles