I am very new to Plugin development. I have an existing NPAPI plugin that works fine on Firefox. I want to reuse it and load it in Safari as well. To get started I downloaded the sample plugin from http://mxr.mozilla.org/mozilla2.0/source/modules/plugin/sdk/samples/basic/mac/. Built it in XCode and added the plugin under /Library/Internet Plugins/. I see that browser notifies asking for permission to access the plugin but I don't see it actually getting loaded. I am doing the following.
var npPlugin = document.createElement("embed");
(npPlugin).type = "application/x-myPlugin";
(npPlugin).data = "data:application/x-myPlugin,";
npPlugin.setAttribute("style", "width:0;height:0");
window.document.body.appendChild(npPlugin);
Couldn't find a good way to debug it, so tried the raw way of creating a file and writing logs to it. I added this to both NP_GetEntryPoints & NP_Initialize with a hope that one of these functions will be invoked at the time of loading and will log for me. I didn't see any signs of my plugin getting loaded. Any ideas on how to make it to load or how to actually debug it?