Google 已添加适用于 Chrome 的扩展 API。现在可以使用 HTML/CSS/JS 编写扩展。我试图将 SWF 嵌入 html 页面并与此页面通信,但我得到:
SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller chrome-extension://ilnamifbpeaokmlgefmainkehgpoppkj/main.swf cannot access chrome-extension://ilnamifbpeaokmlgefmainkehgpoppkj/options.html.
有没有办法允许SWF访问扩展HTML页面?它们位于同一个“域”中。
如果有人能提供帮助,我将不胜感激。
最佳答案
SWF 和扩展程序的 HTML 页面之间可能无法进行通信。问题在于,在 Chrome 中,Flash 插件由于其对资源访问的要求而无法沙箱化。因此,即使它们位于同一域中,SWF 也位于扩展程序的 HTML 页面呈现的沙箱之外。因此会出现错误。我不确定这是否是设计的那样。您可能想在 the Chromium issue tracker 中提交错误.
关于flash - Flex 中的 Google Chrome 扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1817339/