问题
The Google Chrome NPAPI is being phased out.
Without using NPAPI, is there any way to allow an extension to execute a command on the local system?
回答1:
There is chrome.runtime.sendNativeMessage which can be used to send a message to a native application and chrome.runtime.connectNative which allows for a more persistent connection.
So, you can't directly execute a command, but you can have a native app do it for you.
You can find more info on Native Messaging in the docs.
来源:https://stackoverflow.com/questions/19917543/execute-a-program-from-a-chrome-extension