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

107
Vistas
await is only valid in async functions and the top level bodies of modules

trying to make a chrome extension that scrapes a website but it always scapes it before the content is fully loaded (tried after document read thing in manifest.json)

everytime that is getting called I am getting:

await is only valid in async functions and the top level bodies of modules
const sleepz = (ms = 0) => {
    return new Promise(r => setTimeout(r, ms));
};

const finsh_minting_shit = async(profile,user_id_now) => {
  console.log("das huhn hat ein ei gelegt");
  await sleepz(4000);
  console.log("RuehrEi")
});

window.onload = function() {
  finsh_minting_shit(profile,user_id_now);
}

also tried:

await finsh_minting_shit(profile,user_id_now);
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

const sleepz = (ms = 0) => {
    return new Promise(r => setTimeout(r, ms));
};

const finsh_minting_shit = async(profile,user_id_now) => {
  console.log("das huhn hat ein ei gelegt");
  console.log("RuehrEi")
});

window.onload = function() {
  await sleepz(4000);
  finsh_minting_shit(profile,user_id_now);
}
about 4 years ago · Juan Pablo Isaza Denunciar
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