Netscape-style plug-ins are programmed in C, and, provided that you are building in Mach-O form, can be developed and debugged with Xcode.
The scripting capabilities of Netscape-style plug-ins are provided by extensions onto the original plug-in specification. They allow a browser (through JavaScript) to access and control elements of the plug-in and its content, and allow the plug-in to access the enclosing web page and its content through the plug-in script interface.
When a plug-in is loaded, the browser calls the JavaScript method NPP_GetValue
, which should return NPClass and NPObject instances that represent your plug-in. The NPClass defines the interface between the plug-in and the scripting environment, while NPObject represents your custom instance of that class which can then be used by the scripting environment. Thus, if you want your plug-in to be scriptable, you need to return the appropriate NPObject by reference in your own implementation of NPP_GetValue
.
A good demonstration of accessing plug-ins from JavaScript, as well as all the other concepts in creating a Netscape plug-in, can be found at::
/Developer/Examples/WebKit/NetscapeMoviePlugIn |
© 2005, 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-10-15)