谷歌浏览器 --allow-file-access-from-files 为 Chrome Beta 8 禁用 [英] Google Chrome --allow-file-access-from-files disabled for Chrome Beta 8

查看:82
本文介绍了谷歌浏览器 --allow-file-access-from-files 为 Chrome Beta 8 禁用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用 jQuery 和 Microsoft Seadragon 技术开发 AJAX 应用程序.
我需要访问 html5 canvas 函数 toDataURL.

I have been developing an AJAX application using jQuery and Microsoft Seadragon technology.
I need to have access to the html5 canvas function toDataURL.

对于谷歌浏览器,同源规则适用于此功能,这意味着本地运行的页面(URL 中带有 file:///)未能满足同源规则,并且抛出异常.

With Google Chrome, the same origin rule applies to this function which means that a page run locally (with the file:/// in the URL) failed to satisfy the same origin rule and an exception is thrown.

在 Chrome 7 中,使用 --allow-file-access-from-files 选项启动应用程序,允许从本地文件调用 canvas.toDataURL().

With Chrome 7, starting the application with --allow-file-access-from-files option, allows to call canvas.toDataURL() from local files.

但是,似乎从 Chrome Beta 8 开始使用相同的选项 (--allow-file-access-from-files) 不允许调用 canvas.toDataURL() 在本地文件上.

However, it seems that starting the Chrome Beta 8 with the same option (--allow-file-access-from-files) does not allow the call canvas.toDataURL() on the local file.

Chrome 是放弃了 --allow-file-access-from-files 选项还是刚刚被禁用,因为它是 Beta 版本而不是完整版本?

Does Chrome gave up on the --allow-file-access-from-files option or it has just been disabled since it is a Beta release and not a full release?

谢谢!

推荐答案

查看相关问题 表明整个 --allow-file-access-from-files 事情是仓促的.

Looking at the issues for this shows that the whole --allow-file-access-from-files thing was rushed.

  1. Firefox 做到了……"
  2. 我们该怎么做?"
  3. 一段时间过去了
  4. 这是补丁"
  5. 通过!在主干上想知道下一个开发版本会发生什么"
  6. 啊,坏了"使用命令行选项"好的"
  7. 我们发货了!"
  8. WTF 伙计们?你们弄坏了我所有的东西!你们为什么不早点告诉我们?"
  9. 沉默

解决您的问题
事实上,这似乎是测试版的特别之处,我在这里使用 Chrome 8.0.552.5 dev 并且 --allow-file-access-from-files 的工作原理类似于符合预期,我也用 Chromium 9.0.592.0 (66889) 测试过它是否也按预期工作.

On to your Problem
Indeed it seems that this is something special to the beta, I'm using Chrome 8.0.552.5 dev here and --allow-file-access-from-files works like expected, I've also tested this with Chromium 9.0.592.0 (66889) were it also works as expected.

我怀疑 dev 分支上有一些变化.不幸的是,几乎不可能在 Chromium 的问题跟踪器上找到一些东西.

I suspect there have been some changes on the dev branch. Unfortunately, finding something on chromium's issue tracker is nearly impossible.

这篇关于谷歌浏览器 --allow-file-access-from-files 为 Chrome Beta 8 禁用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆