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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depends on your manifest file, especially all_frames property of content_scripts.
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.