javascript - Is there an easy way of running a program from a Firefox addon? -
i found runtime.connectnative
, read overly complex (it requires os specific configuration of target executable, permissions addond , other over-engineered things). looking trivial solution on few lines like:
const exec = require('child_process').exec; exec('pwd', (error, stdout, stderr) => { console.log(`stdout: ${stdout}`); });
from documentation (and others, jaromanda x, wrote) seems it's not possible without lot of boilerplate around native messaging.
depending on trying achieve, might @ custom protocols. if program run initiated user, use link, e.g. "myschema://somearguments" run external program. more info there - http://kb.mozillazine.org/register_protocol#firefox_3.5_and_above.
Comments
Post a Comment