0

我有一个 Facebook 即时游戏和一个在本地打开 url 的按钮 测试,按钮按预期工作:单击按钮 - > url 在新选项卡中打开

在 Facebook 网页和 Facebook 即时游戏嵌入式测试播放器上进行测试,按钮出错且 url 未打开

Blocked opening [url] in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set.

打开网址时出错 Facebook 即时游戏是否允许打开网址?

4

1 回答 1

0

如果您通过网络共享互联网并使用缓存文件,您可以编辑社交媒体的任何文件,这样您就可以在本地为那些在您的网络上浏览它们的人编辑它们。

为了对框架“属性”执行“allow-popups-to-escape-sandbox”。这允许沙盒文档生成新窗口,而不会在它们上强制沙盒标志,从而创建一个干净的浏览上下文。例如,第三方广告可以被安全地沙盒化,而不会对登录页面施加相同的限制。

可以使用 window.open() 和 target="_blank" 链接生成弹出窗口。

<!-- No sandbox there... Popup window won't be sandboxed as well -->
<iframe id="red" src="iframe.html"></iframe>

<!-- This sandboxed frame will allow sandboxed popup window to open popups
 //but not to execute JavaScript for instance. -->
<iframe id="green" src="iframe.html" sandbox="allow-popups"></iframe>

<!-- This sandboxed frame will create a clean non sandboxed popup window,
 //allowed to execute JavaScript and open popups. -->
<iframe id="blue" src="iframe.html"
   // sandbox="allow-popups allow-popups-to-escape-sandbox"></iframe>
于 2019-06-19T06:24:07.983 回答