Google chrome extension 如何在firefox extension background.js中加载本机客户端模块清单格式(.nmf)

Google chrome extension 如何在firefox extension background.js中加载本机客户端模块清单格式(.nmf),google-chrome-extension,firefox-addon,google-nativeclient,Google Chrome Extension,Firefox Addon,Google Nativeclient,我正在为firefox开发一个支持本机消息传递的扩展,我想在发送到本机应用程序时加密我的请求/响应,为了实现同样的目的,我正在尝试在扩展的background.js文件中嵌入secureChannel.nmf(本机客户端清单格式)文件,但它不起作用,同样在chrome扩展中也能很好地发挥作用 ========================================== SecureChannel.nmf文件包含: { "program": { "portable": {

我正在为firefox开发一个支持本机消息传递的扩展,我想在发送到本机应用程序时加密我的请求/响应,为了实现同样的目的,我正在尝试在扩展的background.js文件中嵌入secureChannel.nmf(本机客户端清单格式)文件,但它不起作用,同样在chrome扩展中也能很好地发挥作用

==========================================

SecureChannel.nmf文件包含:

{
  "program": {
    "portable": {
      "pnacl-translate": {
        "url": "SecureChannel.pexe"
      },
      "pnacl-debug": {
        "url": "SecureChannel_unstripped.bc"
      }
    }
  }
}
=========================================

background.html

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />

</head>
<body>
    <div id="listenser">
        <embed name="moto_native_cl" id="moto_native_cl" path="nacl" src="../nacl/SecureChannel.nmf" type="application/x-pnacl" />
    </div>

    <script src="../scripts/background.js"></script>
</body>
</html>

================================================================

我得到这个错误: 未声明框架文档的字符编码。如果在没有文档框架的情况下查看文档,文档可能会显示不同

我在background.js中有个电话 var msg=NativeClient.naclModule.postmessageandwaitresponse(makeMessage('generateEcdhKey','')

对于此调用,它抛出错误,因为PostMessageAndWaitResponse不是函数


我们可以使用我在chrome扩展中使用的相同.nfm文件吗?如果不能,请告诉我firefox中的替代文件。

NaCl是chrome-only。谢谢您的回答。如何在Firefox扩展名的background.js文件中调用加密API。我只需要在将请求发送到本机应用程序时对其进行加密。我不知道。FF中可能没有其他选择。NaCl仅含铬。谢谢您的回答。如何在Firefox扩展名的background.js文件中调用加密API。我只需要在将请求发送到本机应用程序时对其进行加密。我不知道。在FF中可能没有其他选择。