问题
Using Chrome 17.0.963.46 m, I tried to create a new web worker from inside a web worker. But got a "Uncaught ReferenceError: Worker is not defined"
Any info. on this? (Google throw surprisingly few links on creating web worker inside webworkers)
回答1:
That is the current state even on Chrome 19 - here is the bug: http://code.google.com/p/chromium/issues/detail?id=31666 It's working on FF.
回答2:
Creating workers within workers is not available in chrome. FF implemented this with the Example.
See the link for Example and Chroem bug.
https://developer.mozilla.org/en-US/docs/DOM/Worker/Functions_available_to_workers
https://developer.mozilla.org/en-US/docs/DOM/Using_web_workers?redirectlocale=en-US&redirectslug=Using_web_workers
Example specified by Mozilla Developer network.
https://developer.mozilla.org/samples/workers/fibonacci/
Chroem BUg
http://code.google.com/p/chromium/issues/detail?id=31666
来源:https://stackoverflow.com/questions/9259251/unable-to-create-web-worker-from-inside-webworker-in-chrome