views:

152

answers:

2

More precisely my goal is to create an add-on (or plug-in?) which is able to communicate with my main Cocoa application using something like the NSDistributedNotificationCenter. I need to be able to inject JavaScript code into the current webpage and get return values from the JS calls when my add-on receives the request to do so by my main application. Then I need to pass the return values back to my main application for processing.

Alternatively if there is a simple way to call JS in the active Firefox webpage and get return values that would also do the job.

If you want more info on why I want to do this, you can look at my other question: http://stackoverflow.com/questions/1711342/how-to-send-javascript-code-to-ie-using-c-net-3-5-run-it-then-get-a-string

Note that I'm not only interested in knowing how to make a Firefox add-on but also in everything I talked about above. For example, how to inject JS into the active webpage, etc.

I'd like guidance on what technologies to use, tutorials and sample code if possible. The best would be a sample Xcode project but I'm not counting on this :P

Thanks in advance!

N.B: I'm working on 10.4.

A: 

First learn how to write add-ons for Firefox. Adding Objective-C code afterwards is the easy part.

Georg
Can Firefox addons (not plugins) have languages other than js (and xul for layout)?
Amarghosh
From the look of this tutorial (which I had found before posting my question) XPCOM seems interesting but it looks like it's used inside js only... I'm still clueless about which technology I need to use to develop an addon in C / Obj-C. Where does the C / Obj-C code fit in all these technologies?
Form
https://developer.mozilla.org/en/Creating_Custom_Firefox_Extensions_with_the_Mozilla_Build_System
Georg
A: 

Hi,

I know there is source available to the OSX FF Plugins for displaying download progress over the Dock Icon (http://github.com/vasi/firefox-dock-progress) and the "pdf plugin" that allows FF to do in-line PDFs is on Google Code.

Andrew