我使用了chrome.management.getAll()函数来列出我的Google Chrome浏览器上安装的所有扩展程序。但是,此函数仅返回我从chrome Web商店安装的扩展,而不是我已加载的扩展(我创建的扩展)。 我正在使用此功能,旨在与第二个扩展建立通信。
chrome.management.getAll(function(extInfos) {
extInfos.forEach(function(ext) {
console.log(ext.name);
});
});
答案 0 :(得分:0)
您是否只需要id
在扩展程序之间传递消息?检查:https://developer.chrome.com/extensions/messaging#external。 id
可以从扩展程序列表中轻松检索(只需复制/粘贴),并且在您发布扩展程序时也会保持不变。