Advertisement

Asynchronous Events

  • Yiyi Sun
Chapter

Abstract

The JavaScript runtime executes event handlers one at a time in the event loop. If an event handler takes a long time to execute, the user interface appears to be unresponsive or frozen. This is because the JavaScript runtime must wait for the event handler to finish. The code execution is blocked while waiting. To avoid blocking the code execution, JavaScript uses a technique called asynchronous operations.

Copyright information

© Yiyi Sun 2019

Authors and Affiliations

  • Yiyi Sun
    • 1
  1. 1.ThornhillCanada

Personalised recommendations