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

93
Visualizações
Editing the style of a JavaScript rendered page element once loaded on my page using Async/Await

I am trying to edit the style of a page element which is rendered by a third party script. I know I can target the elements using

const variable = document.querySelector('.class')

and then change the style using

variable.style.colorEtc = 'red or whatever';

I previously tried to just use

setTimeout(changeStyle, delay)

but the load time is unpredictable and can cause issues.

I'm wondering if there is a way to use promises and async/await to cause the query selectors and style changes to load asynchronously and then run once the targets are rendered.

I have no idea what this looks like in practice. How can I target a js render performed by third party script as the condition that the variables are awaiting to run once loaded?

I hope I understood async/await correctly, but if not, I'm open to alternative solutions.

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