在 Firefox 扩展中加载 firebreath 插件,而不在 DOM 中注入任何内容
有没有办法在 firefox 扩展中加载 firebreath 插件。我已经看到了一种方法,将与插件相关的 html 注入到 DOM 中,如此处解释(请参阅“http://stackoverflow.com/questions/5688904/scriptable-npapi-plugin-不适用于 Firefox”) 我认为扩展程序最好在后台加载插件以避免任何安全问题。 我的插件与绘图无关,它只是通过调用一个简单的函数将数据发送到特定端口。我是扩展开发的新手,所以任何示例都会有所帮助......
Is there any way to load firebreath plugin in firefox extension.I've seen one way by injecting html related to plugin into DOM as explain here(see "http://stackoverflow.com/questions/5688904/scriptable-npapi-plugin-doesnt-work-with-firefox")
I think its better that extension will load plugin in background to avoid any security issues.
my plugin has nothing to do with drawing, its just send data to a specific port by calling a simple function.I'm new to extension development so any example will be helpful...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来你已经明白了,但为了任何发现这个问题的人有同样的问题:基于 NPAPI 的插件(FireBreath 或其他)只能加载到 DOM 内部;然而,对于 Firefox 扩展(或 Chrome 扩展)来说,它不一定是网页的 DOM,它也可以是扩展的 DOM。
在这种情况下,您可以在 XUL 文件中加载插件。
还值得查看此线程:
在 Firefox 扩展中使用 Firebreath 生成的插件?
Sounds like you figured it out, but for the sake of any who find this question with the same issue: a NPAPI-based plugin (FireBreath or otherwise) can only be loaded inside of a DOM; however, in the case of a firefox extension (or Chrome extension for that matter) it doesn't have to neccesarily be the DOM of the web page, it could also be the DOM of the extension.
In this case, you can load the plugin in the XUL file.
It's also worth checking out this thread:
Using a plugin generated with Firebreath in a Firefox Extension?