如何使用 --allow-files-access-from-files 参数在 OS X 上启动 Google Chrome?

cod*_*aig 8 google-chrome osx-snow-leopard macos

我在 OS X (Snow Leopard) 上运行谷歌浏览器 (12.0.742.122),我需要传递“--allow-files-access-from-files”选项,以便我可以测试一些我正在使用的本地 javascript 内容工作。

我尝试使用以下命令行方法:

/Applications/Google\ Chrome.app/Content/MacOS/Google\ Chrome --allow-files-access-from-files

open /Applications/Google\ Chrome.app/Content/MacOS/Google\ Chrome -n --args --allow-files-access-from-files
Run Code Online (Sandbox Code Playgroud)

两者都将启动谷歌浏览器,但它似乎不接受这个论点,因为我仍然无法测试我的本地 Javascript。

有什么建议?

mba*_*man 6

open -a "Google Chrome" --args --allow-file-access-from-files
Run Code Online (Sandbox Code Playgroud)

我不知道如何充分测试--allow-file-access-from-files交换机,但它对--incognito我有用(相同版本和操作系统)。

似乎 Chrome 不喜欢被打开两次;当将-nswitch传递到open(应该打开一个新实例)时,它会立即杀死自己。

编辑:'allow-files-access-from-files' 应该是 'allow-file-access-from-files'