本文介绍了从Chrome扩展程序执行程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
谷歌浏览器NPAPI 正在分阶段实施。
不使用NPAPI,是否有任何方法允许扩展在本地系统上执行命令?
解决方案有 chrome.runtime.sendNativeMessage ,可用于向本机应用程序发送消息并 chrome .runtime.connectNative ,它允许更持久的连接。
所以,你不能直接执行一个命令,但你可以一个本地应用程序为你做。
你可以在 文档 。
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?
解决方案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.
更多推荐
从Chrome扩展程序执行程序
发布评论