我正在從此site瞭解網絡工作人員,並遵循該示例,但我不斷收到此錯誤。這是什麼意思?我的index.html和pi.js文件都保存在我的桌面上。如何解決使用html5 web worker時的安全錯誤?
index.html:9 Uncaught SecurityError: Failed to construct 'Worker': Script at 'file:///Users/jlei/Desktop/pi.js' cannot be accessed from origin 'null'.
此之前幾次有人問。 [請使用Google](https://www.google.cz/search?q=Script+at++cannot+be+accessed+from+origin+'null')。特別是我建議我在這裏回答:http://stackoverflow.com/a/33432215/607407 –
[Chrome無法加載web worker]的可能重複(http://stackoverflow.com/questions/21408510/chrome-cant-負載網絡工作者) –