Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

89
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda