在带有沙盒属性的 iframe 中,Flash无法工作

9

我使用了iframe来展示一些页面。这些页面可能包含像视频之类的adobe flash内容。我的问题是,在带有沙盒属性的iframe中,adobe flash无法执行。 我的iframe标签:

<iframe sandbox="allow-popups allow-pointer-lock allow-same-origin allow-forms allow-scripts" src="http://example.com"></iframe>
1个回答

6
简短回答:您无法在沙盒化的iframe中执行Flash插件。
规范文档:http://www.w3.org/TR/html5/embedded-content-0.html#attr-iframe-sandbox 引用:
“不能被保护的插件在沙盒浏览上下文中被禁用,因为它们可能不遵守沙盒所施加的限制(例如,即使禁用了沙盒中的脚本,它们也可能允许脚本)。如果提供了覆盖沙盒的选项,则用户代理应向用户传达覆盖沙盒的危险。”
有关沙盒属性的全面信息,请参见:http://blog.dareboost.com/en/2015/07/securing-iframe-sandbox-attribute/

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接