2015-07-22 73 views
2

我的firefox插件是使用firebreath框架编写的。它工作得很好,直到28版的Firefox。对于更高版本,我无法通过firefox插件从我的JavaScript页面调用firebreath DLL的功能。它在示例html文件中非常完美。我也附上我的源代码供您参考。无法调用firebreath dll函数

电话firebreath DLL函数:

var plugin = document.getElementById('dllID'); 
if(plugin.valid) 
{ 
    var ngInfo = plugin.ReturnUsers(param1, param2); 
    if(ngInfo.length >0) 
    { 
     // do something 
    } 
} 

Overlay.xul:

<?xml version="1.0"?> 
<?xml-stylesheet href="chrome://global/skin/"?> 
<overlay id="guardOverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"> 
<script type="application/x-javascript" src="chrome://guard/content/ngContent.js"/> 
    <vbox style="height:0;"> 
     <html:embed type="application/x-guard" id="guard" style="height:0;"/> 
    </vbox> 
</overlay> 

在捕获异常这表明, 类型错误:plugin.ReturnUsers不是一个函数

有谁知道解决我的问题?

+0

它是一个二进制文件吗?还是你用js-ctypes调用它?二进制文件已被弃用,您需要转移到js-ctypes:https://blog.mozilla.org/addons/2015/05/04/dropping-support-for-binary-components/comment-page-1/#comment- 215903 – Noitidart

+0

哪个平台? Windows,Mac,Linux?在Windows中,他们可能已经去了Firefox的64位插件28 – taxilian

+0

它是为windows平台编写的 –

回答

0

最有可能的问题是,你已经结束了运行64位版本的Firefox; 64位版本的Firefox只能运行64位版本的插件。尝试安装32位版本的Firefox 28或将您的插件重建为64位。