1

我正在编写一个扩展程序,它在用户碰巧在的任何页面上打开一个 iframe。我希望扩展直接访问这个框架,很可能使用 chrome.runtime API。出于其他原因,我还想避免在此 iframe 上使用内容脚本。我的 iframe 是从“localhost”加载的,所以我的 manifest.json 有这个属性:

  //External access permissions
  "externally_connectable": {
    "matches": [
      "http://localhost/*",
    ]
  }

使用 Google 本教程中提供的信息,我想使用消息传递扩展联系 iframe。这可能吗?

4

0 回答 0