网页中的iframe将消息传递给Chrome扩展程序(external_connectable)

时间:2019-11-07 04:46:16

标签: google-chrome-extension

在我的页面中,使用src空白创建了一个iframe。 然后将chrome.runtime.sendMessage(appId, option, callback)注入iframe。 但出现错误:chrome.runtime未定义。

由于content script有一个道具match_about_blank(请参见https://developer.chrome.com/extensions/content_scripts#match_about_blank) 如何在externally_connectable中取得成就? (官方文档:https://developer.chrome.com/apps/manifest/externally_connectable

0 个答案:

没有答案