Basic example script plugin for Firefox in C ++ with VS2005 / 8

My experience writing a plugin for Firefox is below zero. Is there anyone out there who could give me some sample code on how to do this in C ++ with VS2005 / 8?

What I need to do with JavaScript on the html hosting page is something like this:

var obj = document.getElementById("MyFFPlugin"); var value = obj.CalculateValue; // Work with calculated value 
+4
source share
2 answers

The SDK has basic examples of how to write Mozilla plugins, which can be downloaded here: http://mxr.mozilla.org/seamonkey/source/modules/plugin/tools/sdk/

Here is the official mozilla plugin site http://www.mozilla.org/projects/plugins/

Hope this helps.

+4
source

I highly recommend using Nixysa http://code.google.com/p/nixysa/ , which wraps NPAPI. Online:

Nixysa is a structure written in Python that automatically generates glue code for NPAPI plugins (plugins for browsers such as Google Chrome or Firefox), allowing you to easily expose C ++ Classes for Javascript from a simple IDL view. Nyxis was originally conceived for the needs of O3D, but flexible enough to support a wide range of use cases.

Try

Check the code following the instructions here and try the sample in the examples / complexes.

The sample includes a Visual Studio 2005 project.

0
source

All Articles