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?
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?
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.