0

In a Chrome Extension:

How can I check in which iframe of a multi iframe page a Content Script was injected?

e.g. After injecting Content script into Gmail, how to check in which iframe is really located?

jacktrades
  • 7,224
  • 13
  • 56
  • 83
  • @SkalárWag They work on GMail. The web store is the only explicit exclusion, see http://stackoverflow.com/a/11614440 – Rob W Aug 09 '12 at 08:23

1 Answers1

0

Depends on your manifest file, especially all_frames property of content_scripts.

    "content_scripts": [
    {
        "all_frames": true/false
    }

If all_frames = false, it doesn't inject into any iframe, because it injects only into the top iframe, i.e. the document. If all_frames = true, it injects into all iframes. See the documentation.

Skalár Wag
  • 2,247
  • 2
  • 18
  • 21