从Chrome扩展程序执行程序 [英] Execute a program from a Chrome Extension

查看:119
本文介绍了从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扩展程序执行程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆