Uncaught ReferenceError: importScripts is not defined

后端 未结 3 1659
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-14 14:56

Why do I keep getting this error?

I should be able to use this global function right?

http://www.html5rocks.com/en/tutorials/workers/basics/

I\'m usi

3条回答
  •  时光取名叫无心
    2020-12-14 15:26

    This code needs to be inside a worker script. The worker itself is created via a new Worker object - see Getting Started in the tutorial.

    The code you've linked is inside the worker created here.

提交回复
热议问题