NPRuntime 为什么需要 xpt 文件?
我试图理解我所学到的有关 NPRuntime 的知识。 这里是来自 mozilla-central 的 NPRuntime 插件的 NPRuntime 插件示例,其中提到以下几行
// ==============================
145 // ! Scriptability related code !
146 // ==============================
147 //
148 // here the plugin is asked by Mozilla to tell if it is scriptable
149 // we should return a valid interface id and a pointer to
150 // nsScriptablePeer interface which we should have implemented
151 // and which should be defined in the corressponding *.xpt file
152 // in the bin/components folder
现在 AFAIK NPRuntime desn不需要复制xpt文件,xpt文件特定于XPCOM并且NPRuntime不使用 XPCOM。那么上面的说法是什么意思呢?
I am trying to make sense of whatever I learned about NPRuntime. Here is a example of NPRuntime plugin from from mozilla-central of NPRuntime plugin, which mentions following lines
// ==============================
145 // ! Scriptability related code !
146 // ==============================
147 //
148 // here the plugin is asked by Mozilla to tell if it is scriptable
149 // we should return a valid interface id and a pointer to
150 // nsScriptablePeer interface which we should have implemented
151 // and which should be defined in the corressponding *.xpt file
152 // in the bin/components folder
Now AFAIK NPRuntime desn't require to copy xpt file, xpt file is specific to XPCOM and NPRuntime does not use XPCOM. So what does above statement mean ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如您从实际代码中看到的那样,该评论是关于 xpt 和 nsScriptablePeer 的。请在 Core:Plugins 中提交有关此问题的错误,并在评论中提及它(补丁的奖励积分!)
That comment lies, both about xpt and the nsScriptablePeer, as you can see from the actual code. Please file a bug in Core:Plugins about this and mention it in a comment (bonus points for the patch!)