0
votes

I have a NPAPI plugin (built using firebreath) which works fine Safari and Google Chrome (both on Mac); But it fails to work on Firefox. When I looked at the Firefox plugins (about:plugin) it correctly shows my plugin name and version and shows it as Enabled.

Following is the code I use to load the plugin in javascript -

<object name="fp" type="application/x-myplugin" width="0" height="0">
    <embed name="jsPlugin" id="jsPlugin" width="0" height="0" type="application/x-myplugin">
    </embed>
</object>

And I use this plugin as follows -

function PluginVwersion(){
    var jsPlugin = document.getElementById('jsPlugin');
    jsPlugin.GetScannerDetails();
}

But whenever I test this code in firefox, it doesn't work, and I see following error in the Error Console - Error: jsPlugin.GetScannerDetails is not a function Source file: file:///Users/u162794/Desktop/test.html

Any help is appreciated.

Regards, Yogesh Joshi

1

1 Answers

1
votes

Why exactly are you trying to use an embed tag inside an object tag? Remove the embed tag, set your object tag id to jsPlugin, and then try it.

<object id="jsPlugin" type="application/x-myplugin" width="0" height="0"></object>

Also try using the example FBControl.htm file that is created in the build/projects//gen folder in your project like is suggested on the FireBreath website.