Unable to create Web Worker from inside webworker in Chrome

烈酒焚心 提交于 2019-12-09 18:25:25

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!