Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3796798
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:17:54+00:00 2026-05-19T13:17:54+00:00

I want my Chrome extension to rerun a contentscript for all open tabs prior

  • 0

I want my Chrome extension to rerun a contentscript for all open tabs prior to viewing the popup window to gather the most recent data about each webpage (it sends a message to the background page). My problem is that in order to get full access to each iframe, I need to set allframes to true. This means that prior to showing the popup window, I need to wait until I have received a message from each frame.

My problem is that I am not sure how to determine how many frames there are. One approach I looked at would be to detect the frame count from within the contentscript, but there is an open bug which indicates that you can’t request that right now. Another is to just wait for a number of responses equivalent to what I got when I first navigated to the page, but it is possible that due to AJAX calls the number of frames increased since then. Finally, I was hoping that the response to chrome.extension.SendRequest would include such information but it does not.

Your help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T13:17:55+00:00Added an answer on May 19, 2026 at 1:17 pm

    I suggest that you always run the content script from the manifest, so that the content script will run every time a new frame loads. Then, have the content script open a port to the extension, so that every open frame has a port to the background. Then it’s up to the background page to keep track of all the open ports for each tab, and send messages to the desired ports.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a chrome extension where I want to fetch all the images
So I wrote a Google Chrome extension. All I want to do is provide
I want to build a Google Chrome extension to sync all my bookmarks across
I am writing a Chrome extension, and I want a login window to be
I want to host a chrome extension by myself and I want the extension
In a Chrome Extension I am developing, I want to access a data structure
I am writing a chrome extension that is a 'content script' I want to
I am developing a chrome extension, and I want to be able to control
I'm creating a chrome extension, and want to be able to get a profile
This is my first hack at writing a Chrome extension. I want it to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.