How to write FireFox extension with Visual Studio using C# programming language?

后端 未结 4 1673
别那么骄傲
别那么骄傲 2020-12-05 20:04

I was wondering if it\'s possible to write Firefox extension using .Net Framework? Had anybody such experience in writing Firefox extensions using C# programming language? A

相关标签:
4条回答
  • 2020-12-05 20:28

    Firefox extensions are written primarily in Javascript. See here: http://www.rietta.com/firefox/Tutorial/backend.html. So unless you can find a way to convert C# code/.NET Framework objects to Javascript, you are out of luck.

    0 讨论(0)
  • 2020-12-05 20:29

    Assuming you're asking about writing an extension (and not a plugin), the best place to get started is with the info at the Mozilla Dev Center.

    Konamiman is correct: extensions are mostly XUL (an XML grammar) and Javascript, packaged into a ZIP file with the extension .xpi. The various links from the page I linked should answer basic questions, like the one you posted above:

    https://developer.mozilla.org/en/Building_an_Extension

    https://developer.mozilla.org/en/Extension_Frequently_Asked_Questions

    0 讨论(0)
  • 2020-12-05 20:38

    As has been observed by other respondents, Firefox extensions are primarily written in Javascript: but you're in luck, because Script# is a free tool that enables developers to author C# source code and subsequently 'compile' it into Javascript.

    0 讨论(0)
  • 2020-12-05 20:42

    I'm not sure how you'd do for C#, but you can use XPCOM to call native code libraries: that's how the Glasser extension, for instance, is able to use the Windows-specific Aero effects.

    IBM hosts a very good XPCOM tutorial at DeveloperWorks.

    0 讨论(0)
提交回复
热议问题