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

140
Vistas
Does a loop that is running in callstack prevent click event of button?

I recently started going deeper about behind the scenes of JS and I got this confusion. Let's say I have a button with an onclick event attached to it. Let's say in the call stack a loop is running that takes few seconds to complete. During this period if I click on the button according to what I have understood till now, the function associated with the click event should not get executed. The callback function for the button click is stored in the callback queue through web API. The callback function won't go in the call stack until the call stack is empty. so when the loop is running the onclick function should not get executed but it is being executed Anyone who could explain to me how it is happening and clear my misconceptions.

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