2012-04-18 70 views
0

我有一個NPAPI插件(使用firebreath構建),它可以很好地運行Safari和Google Chrome(在Mac上);但它無法在Firefox上工作。 當我查看Firefox插件(about:plugin)時,它正確顯示我的插件名稱和版本並將其顯示爲Enabled。NPAPI插件無法在Mac上的Firefox5.0上工作

以下是我用來加載插件在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> 

我使用這個插件如下 -

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

但每當我測試在Firefox中的代碼,它不沒有工作,我在錯誤控制檯中看到以下錯誤 - 錯誤:jsPlugin.GetScannerDetails不是函數 源文件:file:///Users/u162794/Desktop/test.html

任何幫助表示讚賞。

問候, 約傑什喬希

回答

1

究竟爲什麼你想使用一個嵌入標籤的對象標記內?刪除嵌入標記,將對象標記ID設置爲jsPlugin,然後嘗試。

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

也可以嘗試使用在構建/項目所創造//根文件夾中的項目等建議FireBreath網站上的例子FBControl.htm文件。

相關問題