Flash not work in iframe within sandbox attribute

倾然丶 夕夏残阳落幕 提交于 2021-02-06 10:57:56

问题


I've used iframe to show some pages.These pages may contain an adobe flash content like a video. my problem is that the abode flash doesn't execute in an iframe within sandbox attribute. my iframe tag :

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

回答1:


Short answer: you can't execute flash plugin in a sandboxed iframe.

The spec : 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.

For comprehensive information about sandbox attribute: http://blog.dareboost.com/en/2015/07/securing-iframe-sandbox-attribute/



来源:https://stackoverflow.com/questions/26412210/flash-not-work-in-iframe-within-sandbox-attribute

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!