Examples by Chapter
Each recipe in the book has a corresponding example. When possible, the book code has additional code added to make it a fully functioning demo. The code from the book, with minimal modifications, will appear at the top of the example's JavaScript code.
When running the demos, check the browser console for additional logging output.
Asynchronous APIs
Explore fundamental asynchronous JavaScript concepts, including callback functions and Promises.
Simple Persistence with the Web Storage API
Store and retrieve data using persistent storage.
URLs and Routing
Work with the URL and History APIs.
Network Requests
Communicate with remote servers and APIs.
IndexedDB
A more sophisticated data store which can store collections of objects.
Observing the DOM
Listen for changes to DOM elements and their structure.
Forms
Enhance your forms with the FormData and Constraint Validation APIs.
The Web Animations API
Apply keyframe animations to elements programmatically.
The Web Speech API
Add voice synthesis and recognition to your apps.
Working With Files
Read and write file data.
Internationalization
Explore the internationalization APIs built in to the browser.
Web Components
Create custom HTML elements.
UI Elements
Use dialogs and other interactive elements.
Device Integration
Interact with sensors and services on your device.
Measuring Performance
Capture performance metrics.
Working With the Console
Learn about different ways to present information using the Console API.
CSS
Explore CSS related APIs.
Media
Work with images and video.