Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

118
Views
No entiendo por qué este script no funciona en Firefox
  • Este script oculta el bloque principal
  • si no tiene cargado el src de la imagen.
  • Funciona en todos los navegadores excepto Firefox

¿Es esto un error de Firefox o un problema de secuencia de comandos? Si el problema está en el script, ¿cómo puedo hacer que funcione en Firefox?

PD Este error no es visible en este sitio. Intente crear un archivo index.html localmente (sin usar Internet) en su PC y pegue este código allí, luego vea el resultado en Firefox.

 let images = document.querySelectorAll('.Parent_block > .Child_Img'); images.forEach(function(e) { e.onerror = function() { e.closest('.Parent_block').style.display = 'none'; }; });
 .Parent_block { width: 30%; margin: 0; padding: 0; margin-left: 10px; margin-top: 10px; border: 1px solid black; display: inline-block; height: 250px; } img { height: inherit; width: 100%; }
 <figure class="Parent_block"> <img class="Child_Img" src=""> <figcaption class="Img_text">1</figcaption> </figure> <figure class="Parent_block"> <img class="Child_Img" src="https://i.ibb.co/kyXhZmB/photo-2021-11-18-14-40-18.jpg"> <figcaption class="Img_text">2</figcaption> </figure> <figure class="Parent_block"> <img class="Child_Img" src=""> <figcaption class="Img_text">3</figcaption> </figure>

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!