在Chrome浏览器的Firefox本地客户端消息传递中使用类似技术? [英] Similar technology to Chrome's Native Client Messaging in Firefox?
问题描述
是否有类似于Chrome的Native Client Messaging的技术Firefox?
js-ctypes [1]可能是Mozilla最接近的替代方案。 b $ b
https://developer.mozilla.org/en-US/docs/ Mozilla / js-ctypes
我有一个C ++模块,可以编译为本地消息的二进制可执行文件或js-ctypes的库。两者之间的区别主要在于本地消息传递调用二进制可执行文件并执行stdin / stdout数据交换,js-ctypes打开静态/共享库(通过dlopen)并调用库的公开方法,可以返回兼容的数据类型[2],还可以选择调用传递的JavaScript回调方法。
[1] https://developer.mozilla.org/en-US/docs/Mozilla/js-ctypes
We want to replace a custom NPAPI interface between a browser based web application and an client side daemon process.
Is there a similar technology to Chrome's Native Client Messaging in Firefox?
js-ctypes[1] is probably the closest alternative for Mozilla.
https://developer.mozilla.org/en-US/docs/Mozilla/js-ctypes
I have a C++ module that I compile as a binary executable for native-messaging or as a library for js-ctypes. The difference between the two is primarily that native-messaging calls a binary executable and performs stdin/stdout data exchange, and js-ctypes opens a static/shared library (via dlopen) and calls exposed methods of your library which can return compatible data types[2] and optionally call a passed JavaScript callback method.
[1] https://developer.mozilla.org/en-US/docs/Mozilla/js-ctypes
这篇关于在Chrome浏览器的Firefox本地客户端消息传递中使用类似技术?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!