问题描述
我已将Vimeo加入我正在建立的WordPress主题,并收到以下错误:
I've incorporated Vimeo into a WordPress theme I'm building, and I get these errors:
仍在加载:
推荐答案
阅读有关Javascript访问安全性的内容:
Read something about Javascript access security here:
- http://javascript.about.com/od/reference/a/frame3.htm
- Unsafe JavaScript attempt to access frame warning in Safari
- "Unsafe JavaScript attempt to access frame with URL..." error being continuously generated in Chrome webkit inspector
- http://blog.chromium.org/2008/12/security-in-depth-local-web-pages.html
特别是关于实施Vimeo和JavaScript不安全访问,我发现这个在:
Specifically about implementing Vimeo and JavaScript unsafe access, I found this on a discussion on the Vimeo forums:
的东西,确保你不能调用任何api或addEvent
方法在iframe直到播放器完成加载。根据
的示例,您需要先添加onLoad事件,然后在该处理程序中执行
。
The thing to make sure is that you can't call any of the api or addEvent methods on the iframe until the player has finished loading. As per the example, you need to add the "onLoad" event first and then execute your code inside of that handler.
其次,我检查了你提供的链接,它加载速度快,罚款给我,所以这绝对不是为什么你保持这个页面加载长时间
And second, I checked link you provided, and it loads fast and fine to me, so it is definitely not reason why you keep having this page loading long time
这篇关于不安全的JavaScript尝试使用网址访问框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!