How to load Native Client Module manifest format (.nmf) in firefox extension background.js -
i developing extension supports native messaging firefox, want encrypt request/response while sending native application, achieve same, m trying embed securechannel.nmf (native client manifest format) file in background.js file of extension, not work , same works fine in chrome extension.
==========================================
securechannel.nmf file contains:
{ "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>
================================================================
i error: character encoding of framed document not declared. document may appear different if viewed without document framing it.
i have call in background.js var msg = nativeclient.naclmodule.postmessageandawaitresponse(makemessage('generateecdhkey', ''));
for call, throws error postmessageandawaitresponse not function.
can use same .nfm file m using chrome extension, if not, let me know alternative in firefox same.
Comments
Post a Comment