Firefox extension: native code execution?

╄→尐↘猪︶ㄣ 提交于 2019-12-22 06:09:26

问题


Is it possible to write an extension that runs native, platform-dependent code? I'm an extension-newbie (what a phrase!) :), can you please point me towards good material on this subject? (good keywords to feed to Google are enough)

(I would like to put a GtkMenu in Firefox)

Edit: I started checking out the Gecko SDK, and it's a rather big subject, and I'm not sure this is what I want.

I'd be happy with a friendly manual (which is not a raw reference, but rather some kind of tutorial on how to make extensions that utilize XPCOM (if that is the way). Good keywords are still appreciated.


回答1:


Check out the Gecko SDK.

You can use it make portable C++ native code firefox extensions which I believe are XPCOM objects with JavaScript wrappers in the .xpm zip file.

I haven't tried it, but you can go the usual route and write the plugin, I mean extension, in javascript also.




回答2:


Native Client doesn't quite offer the breadths of API firefox extensions offer, but it's still well worth checking out for your purposes IMHO.




回答3:


Yes, you can. Witness the Cooliris extension, that makes (heavy) use of your 3D graphics card, and is Windows specific.



来源:https://stackoverflow.com/questions/1182741/firefox-extension-native-code-execution

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