Node.js Native Messaging host
Installation and usage on Chrome and Chromium
chrome://extensions
.Developer mode
.Load unpacked
.native-messaging-nodejs
folder.nm_nodejs.json
in a text editor, set "path"
to absolute path of nm_nodejs.js
and chrome-extension://<ID>/
using ID from 5 in "allowed_origins"
array. ~/.config/chromium/NativeMessagingHosts
; Chrome dev channel on *nix ~/.config/google-chrome-unstable/NativeMessagingHosts
.node
executable and nm_nodejs.js
are executable.service worker
link in panel of unpacked extension which is DevTools for background.js
in MV3 ServiceWorker
, observe echo'ed message from Node.js Native Messaging host. To disconnect run port.disconnect()
.The Native Messaging host echoes back the message passed.
For differences between OS and browser implementations see Chrome incompatibilities.
Do What the Fuck You Want to Public License WTFPLv2