Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

181
Visualizações
Using Vanilla JS (Chrome Extension), how do you detect if a React page has fully loaded all of its components?

I'm writing a Chrome extension using JavaScript and the extension's purpose is to manipulate the DOM on a website that uses React and dynamically loads different elements. Is there any way to detect that the page has fully rendered?

Using DOMContentLoaded, or even the Load, Event Handlers fail because they trigger right when the base HTML 'root' is structured. This extension is designed to create a task list based on incomplete assignments, which can take an unknown length of time to render fully.

Currently, the issue is worked around by using a custom promise that waits for 1500ms after window.onload before attempting to interact with the DOM. I have also used a 100ms Interval to search for specific components. Neither of these options seem to be the best. The 1500ms option isn't dynamic enough, sometimes 200ms may be enough while other times 1800ms is needed. As for the interval checking, I feel the cost/benefit ratio is too high and would prefer to avoid intervals like that if possible.

What are my options?

Thanks!

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda