iframe沙盒allow-same-origin

时间:2018-09-05 13:22:24

标签: google-chrome iframe sandbox allow-same-origin

我具有以下iframe定义:

<iframe id="super-frame" 
sandbox="allow-same-origin allow-scripts 
allow-forms allow-top-navigation 
allow-pointer-lock 
allow-top-navigation-by-user-activation">
</iframe>

基本上,我只想阻止iframe中的所有“警报”弹出窗口,同时允许其他所有内容。

问题:

来自mydomain.com/abc/page1.html的页面将mydomain.com/abc/page2.html加载到上述iframe中。然后,每当在page2.html中单击指向_parent目标的链接以说出page3.html page4.html等时,Chrome浏览器就不会说这是跨来源的!

因此,不确定iframe的定义是什么问题。如果有人遇到类似情况并知道解决方法,请告诉我。请注意,这是Mac上最新的Chrome版本。

谢谢。

0 个答案:

没有答案
相关问题