[webkit-dev] about script plugin

Darin Adler darin at apple.com
Tue Sep 29 12:53:39 PDT 2009


On Sep 29, 2009, at 3:18 AM, 张正和 wrote:

> I have written a scripting plugin with NPAPI and this plugin has  
> some properties and methods. it has a "intValue" property and two  
> methods of "getValue" and "setValue". Now I don't know when and  
> where to call the functions("NPN_Invoke()", "NPN_GetProperty()") in  
> NPAPI , Could you give me a example?

The functions you mention, NPN_Invoke and NPN_GetProperty, are used in  
the other direction. They are for calling from the plug-in to the  
browser to access properties of objects in the webpage. You don’t  
need to use either of them to export properties and methods from a  
plug-in for access from the webpage.

     -- Darin



More information about the webkit-dev mailing list