我有一個簡單的HTML網站與嵌入式Flash文件和SWFobject使用它。iFrame內的SWFobject:跨域的東西?
此網站是iframe的src。如果我打開與它的iframe控制檯告訴我的網站...
Unsafe JavaScript attempt to access frame with URL file:///experiment/iframe-
test/index.html from frame with URL http://localhost.lan/embed/GYZA. Domains,
protocols and ports must match. -> swfobject.js
我不知道父窗口(在它的iframe)已與iframe中的swfobjet辦?因此,如上所述,swfobject用於將flash嵌入到加載到iframe的子頁面中。 iframe-test/index.html
網站只是...
<body>
<iframe src="http://localhost.lan/embed/GYZA" width="100%" height="100%" frameborder="0" allowfullscreen></iframe>
</body>
...就可以了。而已。爲什麼我有一個unsafe javascript attempt here
?
有關於此的任何想法?先謝謝你。
更新:嗯,我只是認識到,這發生在Youtube和Vimeo以及他們的嵌入式播放器。我正在使用Chrome控制檯,並且Youtube和Vimeo發生同樣的錯誤。