How to implement methods of plug-in that can be called by javascript

"spark.bao" <[email protected]> Wed, 6 Nov 2013 01:38:37 -0800 (PST)
Newsgroups gmane.comp.mozilla.devel.plugins
Message-ID <[email protected]>
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!