我的firefox插件就是使用firebreath框架编写的。在firefox的28版本中,它工作得非常好。对于更高的版本,我只能通过firefox插件才能从我的javascript页面调用firebreath的函数。它在示例html文件中工作得很好。我还附上了我的源代码供您参考。
调用firebreath函数:
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>在捕获异常时,它显示TypeError:plugin.ReturnUsers不是一个函数
有人知道我的问题的解决方案吗??
发布于 2015-07-24 01:02:05
最有可能的问题是,您最终运行的是64位版本的firefox;64位版本的firefox只运行64位版本的插件。尝试安装32位版本的firefox 28或将插件重建为64位。
https://stackoverflow.com/questions/31555121
复制相似问题