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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:40:50+00:00 2026-05-22T14:40:50+00:00

The problem is simple, but can’t figure out a solution. Many thanks for those

  • 0

The problem is simple, but can’t figure out a solution. Many thanks for those who helps.
I want to modify a web page (DOM tree) before it is displayed on screen.
I understand that the DOM tree is fully loaded in memory before being processed.

Do any of you knows a way to process this fully loaded DOM tree while it is on memory
and then let it be displayed with its new structure ?

The reason i want to do that, is because i’m working on an addon that is adding content to an existing web site.

added-> Just need to mention that the existing web site is not mine, so i can’t use php to modify the website content is not mine.

But right now, the web site is displayed without the addon content
and you see the content coming after 1 second (because i append the content after website is already displayed), so you see the website content moving.

Thanks for helping.

  • 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-22T14:40:51+00:00Added an answer on May 22, 2026 at 2:40 pm

    I finally found a solution.

    I make the addon looking at web page navigation. In fact, it looks at url changes so that I know the user is moving to a different location (therefore I know I have to do something before I even got the ‘Load’ event of the web page).

    Then I just try to access an element (that I know will be in the DOM, like the header) using a loop. Then when the element appears (before the ‘Load’ event) I insert the code and stop looping/listening.

    If anyone need more details of how it is all done, I’ll gladly answer your question.

    Thanks.

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

Sidebar

Related Questions

The problem itself is simple, but I can't figure out a solution that does
This seems like a really, really simple problem, but I can't figure it out.
This is probably a really simple problem, but I can't figure out how to
This must be a simple problem but i can't figure out why it's not
I have a real simple problem, but can't seem to figure it out. The
I'm just stuck with a problem (maybe Simple). But I can't figure out how
Hi all I have a (probably) simple problem but I just can't figure out
I've a very simple question but can't figure it out by myself. i've the
I have fairly simple problem but I can not think of the simple solution.
I have a simple problem, but I can't find out how to solve it.

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.