我使用 iframe
来显示一些页面。这些页面可能包含 adobe flash
内容,例如视频。
我的问题是 abode flash
没有在 sandbox 属性内的 iframe
中执行。
我的 iframe
标签:
<iframe sandbox="allow-popups allow-pointer-lock allow-same-origin allow-forms allow-scripts" src="http://example.com"></iframe>
最佳答案
简短回答:您不能在沙盒 iframe 中执行 flash 插件。
规范:http://www.w3.org/TR/html5/embedded-content-0.html#attr-iframe-sandbox
Plugins that cannot be secured are disabled in sandboxed browsing contexts because they might not honor the restrictions imposed by the sandbox (e.g. they might allow scripting even when scripting in the sandbox is disabled). User agents should convey the danger of overriding the sandbox to the user if an option to do so is provided.
有关沙箱属性的综合信息:http://blog.dareboost.com/en/2015/07/securing-iframe-sandbox-attribute/
关于html - Flash 在沙盒属性内的 iframe 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26412210/