简体   繁体   中英

Javascript shell command execution from Firefox web extensions

It's been noticed by all web extension developers that Firefox is going to stop SDK support (API that allows shell execution in client side) and will only accept web extensions.

Due to above-mentioned changes, I'm trying to get a shell command executed by javascript code in Firefox's web extensions' API.

I'm dealing with a web page that executes the web extension (I solved it by using javascript events), but the real trouble is that I need to execute a shell command in the javascript main code to open client programs such as LibreOffice or a background Java code and I don't know how to achieve it.

It's also necessary to execute these shell commands on Windows, OSX and Linux.

您不能直接运行shell命令,但是本机消息传递使您可以与特定的本机应用程序交换消息,该应用程序可以代表您的扩展程序启动其他应用程序: https : //developer.mozilla.org/en-US/Add-ons/WebExtensions / Native_messaging

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM