Useful Links
Computer Science
Programming
By Language
Asynchronous JavaScript
1. Foundations of Asynchronous JavaScript
2. Legacy Asynchronous Patterns: Callbacks
3. The Promise API
4. Async/Await Syntax
5. Common Asynchronous Web APIs
6. Advanced Asynchronous Patterns and Concepts
Common Asynchronous Web APIs
Timers
setTimeout
Scheduling Delayed Execution
Minimum Delay Constraints
Clearing with clearTimeout
Return Value (Timer ID)
setInterval
Scheduling Repeated Execution
Interval Drift and Accuracy
Clearing with clearInterval
Return Value (Timer ID)
Differences Between setTimeout and setInterval
Execution Timing
Use Case Scenarios
requestAnimationFrame
Frame-Based Timing
Browser Optimization
Cancellation with cancelAnimationFrame
The Fetch API
Making Network Requests
Fetch Syntax and Usage
HTTP Methods Support
The Request Object
Creating and Configuring Requests
Request Headers
Request Body
Request Options
method
headers
body
mode
credentials
cache
The Response Object
Reading Response Properties
status
statusText
ok
headers
url
Response Type Checking
Handling Response Data
Parsing JSON with json
Reading Text with text
Handling Other Data Types
Blob
ArrayBuffer
FormData
Handling Network Errors
Detecting and Responding to Failures
HTTP Error Handling
Network vs. HTTP Errors
Timeout Handling
Event Listeners
Asynchronous Nature of User Interaction Events
Event Loop and Event Handling
Non-Blocking Event Processing
DOM Event Handling
Adding Event Listeners
addEventListener Method
Event Handler Properties
Removing Event Listeners
removeEventListener Method
Event Propagation and Bubbling
Capture Phase
Target Phase
Bubble Phase
Custom Events and Asynchronous Triggers
Creating Custom Events
Dispatching Events
Event-Driven Architecture
Previous
4. Async/Await Syntax
Go to top
Next
6. Advanced Asynchronous Patterns and Concepts