Chrome浏览器的Web工作者设置 [英] Web worker settings for chrome
问题描述
我制作了一个适用于Firefox但不适用于GoogleChrome的网站。
该网站使用网络工作者,我得到常见的错误消息:
Uncaught SecurityError:未能创建一个worker:script
'file:///home/useraccount/School/MasterThesis/Code/physijs_worker.js'
不能从原始'null'访问。
我已经阅读过这篇文章,并且在本教程结束时对其进行了很好的解释( http://www.html5rocks.com/en/tutorials/workers/basics/ ),在A单词在安全部分。
这是我的谷歌浏览器版本:
Google Chrome 32.0 .1700.107(官方版本248368)
操作系统Linux
闪烁537.36(@ 165586)
JavaScript V8 3.22.24.17
用户代理Mozilla / 5.0(X11; Linux x86_64)AppleWebKit / 537.36(KHTML,如Gecko)Chrome / 32.0.1700.107 Safari / 537.36
命令行/ usr / bin / google-chrome
- 允许从文件访问--flag-switches-begin
--ignore-gpu-blacklist --flag-switch-end
在这里我们可以看到--allow-access-from-files标志确实被设置。
我在UBUNTU 13.10上运行它。
我也检查过URL链接是否完整,正如很多论坛所建议的。
有网站使用Three.js和Physi.js。
对于一些建议,这个问题可能会很好。
在打开 要在Ubuntu中打开它,只需写 I have made a website which works on Firefox but not on GoogleChrome.
The website uses a web worker and i get the common error message: I have read about this, and it is very well explained at the end of this tutorial (http://www.html5rocks.com/en/tutorials/workers/basics/), in the A word on Security section. This is my google-chrome version: Here we can see that the --allow-access-from-files flag truly are set.
I am running it on my UBUNTU 13.10. I have also checked that the URL link are complete, as many forums suggests. There website are using Three.js and Physi.js. It would be nice with some suggestions, on what the problem can be. You have to close all the windows of Chrome before opening it with To open it in Ubuntu simply write 这篇关于Chrome浏览器的Web工作者设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!之前,必须先关闭Chrome的所有窗口 - allow-file-
google-chrome --allow-文件访问从文件
在您的终端。 "Uncaught SecurityError: Failed to create a worker: script at
'file:///home/useraccount/School/MasterThesis/Code/physijs_worker.js'
cannot be accessed from origin 'null'."
Google Chrome 32.0.1700.107 (Official Build 248368)
OS Linux
Blink 537.36 (@165586)
JavaScript V8 3.22.24.17
User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36
Command Line /usr/bin/google-chrome
--allow-access-from-files --flag-switches-begin
--ignore-gpu-blacklist --flag-switches-end
--allow-file-access-from-files
flag on.google-chrome --allow-file-access-from-files
in your terminal.