Discussion:
How to implement methods of plug-in that can be called by javascript
spark.bao
2013-11-06 09:38:37 UTC
Permalink
Hello,

I have read most content of this website:
https://developer.mozilla.org/en-US/docs/Gecko_Plugin_API_Reference, but I still confuse about how to implement that js call plug-in's method.

this page tell something: https://developer.mozilla.org/en-US/docs/Gecko_Plugin_API_Reference/Scripting_plugins, but I think it's not very clear.

Can someone give me a sample or links about this.

thx!
spark.bao
2013-11-12 09:08:59 UTC
Permalink
now I have known about how to implement that js call plugin native method.

I has read these pages:
http://colonelpanic.net/2009/08/building-a-firefox-plugin-part-three/
http://geeklu.com/2010/10/getting-started-with-npapi-plugin/

the second page has a simple sample.

the most import is to implement a NPClass,the use NPN_CreateObject() to create a NPObject,return to browser by NPP_GetValue()。

在 2013年11月6日星期三UTC+8下午5时38分37秒,spark.bao写道:
Post by spark.bao
Hello,
https://developer.mozilla.org/en-US/docs/Gecko_Plugin_API_Reference, but I still confuse about how to implement that js call plug-in's method.
this page tell something: https://developer.mozilla.org/en-US/docs/Gecko_Plugin_API_Reference/Scripting_plugins, but I think it's not very clear.
Can someone give me a sample or links about this.
thx!
Loading...