2
votes

I need to send a string from my Firefox Extension to my C# application.

I use the add-on builder (https://builder.addons.mozilla.org/addon/new).

Can i get some HelloWorld?

1
The compiler complains about this line: var fileStream = Components.classes['@mozilla.org/network/file-output-stream;1'].createInstance(Components.interfaces.nsIFileOutputStream); "XPI not built" - user1908410
I looked into it a bit and i think that the approach in that other link is intended for xul based extensions, not the addon-sdk like you are attempting. I think that error is related to that. I'm not sure how to do this kind of things in addon-sdk, sorry. - Filipe Silva

1 Answers

0
votes

You could write to a file from your extension then read from it in your C#. To write the file in addon-sdk you can use io/file

There is a simple example in this post: HTML5 File API in Firefox Addon SDK