1

Mu my chrome extension is infact a simple EXTERNAM iframe.

<iframe src="http://www.example.com/index.php"></iframe>

My goal is that index.php (inside the iframe)can modify

chrome.browserAction.setBadgetText

Is such thing possible with external Iframe ?

reagrds

yarek
  • 11,278
  • 30
  • 120
  • 219

1 Answers1

2

You can do so with messaging. A more detailed answer is here, but in a nutshell:

  1. You need to add example.com as an appropriate pattern to "externally_connectable" in the manifest.
  2. You need to add code to example.com page that sends a message to the extension.
  3. In your extension's background script, you need to set up a listener for that message, and perform needed operations with it.
Community
  • 1
  • 1
Xan
  • 74,770
  • 16
  • 179
  • 206