“不安全的 JavaScript 尝试使用 URL 访问框架..."Chrome webkit 检查器中不断生成错误 [英] "Unsafe JavaScript attempt to access frame with URL..." error being continuously generated in Chrome webkit inspector
问题描述
例如,在使用 Facebook API 时,Chrome(或任何其他 webkit 浏览器)会抛出大量此类不安全的 JavaScript 尝试使用 URL 访问框架...".
Chrome (or any other webkit browser) throws a ton of these "Unsafe JavaScript attempt to access frame with URL..." when working with the Facebook API for example.
不干扰实际操作,但确实让javascript控制台基本无法使用.
It doesn't interfere with actual operation, but it does make the javascript console basically unusable.
我想知道是否有办法专门在控制台中抑制这些错误?或者,如果你们能想到其他解决方案,我将不胜感激.
I'd like to know if there is a way to suppress these errors specifically in the console? Or if there are other solutions you guys can think of, I would really appreciate it.
谢谢.
推荐答案
您可以在测试期间通过使用 --disable-web-security
命令行选项运行 chrome 来允许跨域请求.这应该可以消除错误(并允许 FB 监视您的测试;)
You could allow cross-domain requests during testing by running chrome with the --disable-web-security
command line option. This should probably get rid of the error (and allow FB to spy on your testing ;)
这篇关于“不安全的 JavaScript 尝试使用 URL 访问框架..."Chrome webkit 检查器中不断生成错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!