Similar technology to Chrome's Native Client Messaging in Firefox?
Asked Answered
H

2

15

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?

Hammack answered 24/9, 2013 at 19:57 Comment(0)
M
10

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

[2] https://developer.mozilla.org/en-US/docs/Mozilla/js-ctypes/js-ctypes_reference/ctypes#Predefined_data_types

Mikamikado answered 30/11, 2013 at 13:37 Comment(3)
I also need to do native-messaging from Firefox, can you give more information on the structure of your solution? Do you mean that you use the binary executable for Chrome and the library for Firefox?Blistery
Do you use this solution for webpg?Blistery
All of the links in this answer are broken now.Charlettecharley
A
2

With new support for Mozilla 'Chrome' WebExtensions API seems like soon there will be a very similar technology to Chrome's Native Client Messaging.

At this time it's still on the 'List of APIs [mozilla] will likely support in the future'

Anatase answered 23/9, 2015 at 1:55 Comment(1)
Now supported: developer.mozilla.org/en-US/Add-ons/WebExtensions/…Cannady

© 2022 - 2024 — McMap. All rights reserved.