views:

330

answers:

1

This would seem to be the case in Firefox 3.5+, there I can instantiate a Web Worker, and inside the worker, spawn another thread. However, the code will not work in Google Chrome, leading me to believe this is either a Mozilla proprietary extension to the spec or that Chrome has not fully implemented the spec. So which is it?

+3  A: 

http://www.whatwg.org/specs/web-workers/current-work/#interface-objects-and-constructors seems to say it MAY be possible (as of 21.10.2009):

"There must be no interface objects and constructors available in the global scope of scripts whose script's global object is a WorkerGlobalScope object except for the following: [...] The Worker and SharedWorker interface objects and constructors."

Here

  • "in the global scope of scripts whose script's global object is a WorkerGlobalScope object" means "among the worker's globals"
  • "must be no ... except" is open to the interpretation.

You might want to search open issues/post feedback. The spec has this text:

To send feedback: [email protected]
To view and vote on feedback: http://www.whatwg.org/issues/
Nickolay