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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:06:00+00:00 2026-06-02T21:06:00+00:00

For some Firefox extensions it makes sense to get their hands on page content

  • 0

For some Firefox extensions it makes sense to get their hands on page content as early as possible for modification, whereas for others as late as possible (e.g. when other extensions may be done with their modifications). It’s clear that there will always be extensions that want to be “first” or “last”, but I’m having a hard time finding material covering this online. For addEventListener(“load”, …) I can only find that the order in which event handlers get called is undefined. If there’s no way for addEventListener, then what other options to influence early/lateness of handling content do I have in Firefox extensions?

  • 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-02T21:06:01+00:00Added an answer on June 2, 2026 at 9:06 pm

    The order in which event listeners are triggered is indeed undefined, you cannot rely on any particular order. As far as extensions go, your best bet is to write code in such a way that you don’t care whether other extensions are already done or not. Other than that, you can choose which event to attach:

    • chrome-document-global-created/content-document-global-created notifications run at the earliest possible point in time, when the window was just created – but the window’s contents won’t be available yet. This option obviously isn’t something that you can use if your code is loaded by an overlay of the window, loading overlays happens way later.
    • DOMContentLoaded event happens once the window’s DOM can be accessed.
    • load event happens later, once all dependent elements load.
    • If you want to run even later, there is the option of calling setTimeout(..., 0) in a load event handler – the timeout is guaranteed to execute after all the load event handlers.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I noticed some Firefox extensions when installed will open up a page once you
I am working on a firefox extensions that makes uses a lot of external
Trying my hand at some simple firefox extensions... I am trying to create a
I use jquery-1.2.6 within my Firefox extensions and it works great. Some days ago
I'm working on some Firefox extensions and I'm trying to set up my vim
I'm trying to build an extension to Firefox to get a page from a
I want to develop extensions for some main browsers like chrome and firefox. Extensions
I am writing my first FireFox extension and I have some questions. Maybe someone
I'm currently developing a firefox extension which checks some server side XML-File on a
I'm going to develop a Firefox extension which uses some Java classes. The extension

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.