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

131
Vistas
Is it possible to catch errors within an iframe with Javascript?

I'm using the lightwidget to include instagram posts to my website with an iframe.

Some people have Firefox settings / plugins to block posts from instagram, so they'll get the error: GET https://scontent-frx5-1.cdninstagram.com/v/somepost net::ERR_NAME_NOT_RESOLVED

because the images wont load. Can I somehow catch that error?

I want to show some message instead and display: none; the iframe, so the user doesn't see an endless spinning wheel.

I tried to catch the error like this, but it didn't work:

window.addEventListener('error', function(event) { 
    alert('error')
})

Thanks for any help

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