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

250
Vistas
Why am I getting a CORS error from just a simple Settimeout function in javascript?

Everything is working fine in Chrome the problem is with FireFox and Microsoft Edge. With these two browsers I keep on getting CORS errors. I am making no API calls in this website. All this function that is causing this error is doing is resetting the opacity of some text I hid back to 1.

This is the function that is causing the error:

setTimeout(() => {
  opacityP.style.opacity = 1;
  opacityB.style.opacity = 1;
}, 3000);

This are the error message from FireFox and Microsoft Edge: Firefox Cors Error

Microsoft Edge Cors Error

Thanks in advance for your help.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I think it's not possible to access local script files at the browser level. You can run the code through a local server like localhost:3000 or so. Xampp or Wamp would work for you. If you're using VS Code, you can use their extension. https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer

Hope this helps you!

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