Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox extension: native code execution?

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.

like image 405
Tamás Szelei Avatar asked Jul 25 '09 18:07

Tamás Szelei


People also ask

What language are Firefox extensions written in?

Add-ons allow developers to extend and modify the functionality of Firefox. They are written using standard Web technologies - JavaScript, HTML, and CSS - plus some dedicated JavaScript APIs.

How do I add unpacked extensions to Firefox?

In Firefox: Open the about:debugging page, click the This Firefox option, click the Load Temporary Add-on button, then select any file in your extension's directory. The extension now installs, and remains installed until you restart Firefox.


2 Answers

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.

like image 85
Sean A.O. Harney Avatar answered Sep 23 '22 06:09

Sean A.O. Harney


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.

like image 36
Alex Martelli Avatar answered Sep 24 '22 06:09

Alex Martelli