Skip to content

Latest commit

 

History

History

example

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

wxnm Example

An example that uses wxnm to have a native application report its process ID to the extension.

Requirements

Setup

  1. Run yarn to install node dependencies
  2. Run yarn build:extension to build the extension and native app
  3. Install the extension in your browser of choice from example/extension/dist
    • If the browser you added it to is Chrome-based, export the extension ID as an environment variable
      > export CHROME_EXTENSION_ID="id"
  4. Run yarn build:node to build the node app
  5. Run the native messaging host installer by running the app with the install flag
    ./node/dist/wxnm-node-example --install
  6. Open the extension popup, and see your process ID!

Troubleshooting

If you run into error messages, see the Chrome native messaging debugging help or the MDN native messaging troubleshooting section.