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 8023969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:43:26+00:00 2026-06-04T22:43:26+00:00

Well, I’m developing a firefox addon that reload a given set of url automatically

  • 0

Well, I’m developing a firefox addon that reload a given set of url automatically with some modification. Its not possible to show the whole code. So, I’ve just copy paste the part of the code which is giving me the error.

The DOMContentLoaded event is suppose to be triggered everything a page is loaded, and it do it properly. The problem is that, if i open a new tab, then DOMContentLoaded event is not triggered in the old tab.

//Any code here runs only for the first time u start the browser
window.addEventListener("load", function() { myExtension.init(); }, false);

var myExtension = { 
init: function()    
{
            var appcontent = document.getElementById("appcontent");
            if(appcontent)
            appcontent.addEventListener("DOMContentLoaded", myExtension.onPageLoad, true);
},

onPageLoad: function(aEvent)
{

    var doc = aEvent.originalTarget; // doc is document triggered "onload" event
    //execute on one the top page (not on iframes)
        if ((aEvent.originalTarget.nodeName == '#document') && (aEvent.originalTarget.defaultView.location.href == gBrowser.currentURI.spec)) 
        {setTimeout(function(){showInError(doc.location='about:home'}, 500);}  
},
}

I’d like to write the problem in a simple way (sorry for my bad English)

1) i run firefox, and the tab (say tab no.1) is continuously reloaded as i want.

2) the tab no.1 page continues to load repeatedly if i leave the page uninterrupted(that’s what it want)

3) if i open a new tab (say tab no. 2), the new tab (tab no. 2) begins to reload continuously as i wanted. However, the tab no. 1 stops reloading.

what i want is to to keep on reloading both tab no 1 and tab no. 2. How to do it? what is wrong is my code?

  • 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-06-04T22:43:27+00:00Added an answer on June 4, 2026 at 10:43 pm

    It looks like you are executing the script only on currently displayed page (active tab).

    If you want to execute it on other tabs, you should attach event listeners to new tabs as you open them (and don’t forget to remove them when you close the tab). You can get useful snippets for this functionality at this page:

    https://developer.mozilla.org/en/XUL_School/Intercepting_Page_Loads#WebProgressListeners

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

Sidebar

Related Questions

Well, not random, because its the same every time, but #include<iostream> using namespace std;
Well, i'm coding some methods for returning solr docs that mach a interval date
Well I'm making a chrome extension that parses some webpage, and that's working right,
Well, that might be a strange question, and maybe just because I'm not familiar
Well I'm doing some Java - C integration, and throught C library werid type
Well i have a transparent div or the background is set to transparent :)
Well after much messing about I have finally got a query that gives sales
Well, I am storing variables inside of a class that will be used for
Well it's not realy causing any errors. Anyways i'm sending ajax request and getting
Well im here because i have a problem. i have code that was created

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.