不安全的 JavaScript 尝试使用 URL 访问框架。它是本地的
我正在使用phonegap 构建一个jQuery 移动应用程序。 当我尝试访问 iframe(可能是 webkit)中的页面时,存在不安全的 JavaScript 尝试访问框架
的问题。框架页面和父页面都在本地,以 file:///
开头。我知道这样的问题在哪里 不安全的 JavaScript 尝试访问 Google Chrome 中的框架但我无法传递 --allow-file-启动时从文件访问开关
在我的手机上。而且我也不想在互联网上部署我的应用程序。还有其他选项可以解决此问题吗?最好不需要对浏览器做任何修改。谢谢。
I am building a jQuery mobile app with phonegap.
There is a issue of Unsafe JavaScript attempt to access frame
when I tried to access a page in iframe (Maybe webkit). Both of the framed page and parent page are at local,which is start with file:///
.I know where is a question like this Unsafe JavaScript attempt to access frame in Google Chrome But I cannot passing the --allow-file-access-from-files switch at startup
on my phone.And I also don't want to deploy my app on internet.Is there any other option to solve this? It should be better that I don't need to do any modification on the browser.Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定 Webkit 是否遵循相同的规则,但有先例。
https://developer.mozilla.org/en/Same-origin_policy_for_file%3a_URIs
I'm not sure if Webkit follows the same rules, but there is a precedent.
https://developer.mozilla.org/en/Same-origin_policy_for_file%3a_URIs