Book description
JavaScript gives web developers great power to create rich interactive browser experiences, and much of that power is provided by the browser itself. Modern web APIs enable web-based applications to come to life like never before, supporting actions that once required browser plug-ins. Some are still in an experimental stage, but many are ready for use today.
With this hands-on cookbook, author Joe Attardi helps you explore the powerful APIs available in modern browsers and guides you through the specific tasks that they unlock. Because these features are web standards, there is comprehensive documentation available from trusted resources such as MDN Web Docs. The knowledge you'll gain is transferable across different companies and projects.
- Learn the breadth of functionality available in modern browser APIs
- Explore future APIs that are still in an experimental stage
- Discover newer elements, such as dialog that replaces the need for a third-party library
- Build more powerful and interactive web applications using native APIs
- Understand the permissions model used by the browser to unlock functionality such as geolocation and push notifications
Publisher resources
Table of contents
- Preface
- 1. Asynchronous APIs
- 2. Simple Persistence with the Web Storage API
- 3. URLs and Routing
- 4. Network Requests
- 5. IndexedDB
- 6. Observing DOM Elements
-
7. Forms
- Introduction
- Populating a Form Field from Local Storage
- Submitting a Form with Fetch and the FormData API
- Submitting a Form as JSON
- Making a Form Field Required
- Constraining a Number Input
- Specifying a Validation Pattern
- Validating Forms
- Using Custom Validation Logic
- Validating a Checkbox Group
- Validating a Field Asynchronously
-
8. The Web Animations API
- Introduction
- Applying a “Ripple” Effect on Click
- Starting and Stopping Animations
- Animating DOM Insertion and Removal
- Reversing Animations
- Showing a Scroll Progress Indicator
- Making an Element Bounce
- Running Multiple Animations Simultaneously
- Showing a Loading Animation
- Respecting the User’s Animation Preference
- 9. The Web Speech API
- 10. Working with Files
-
11. Internationalization
- Introduction
- Formatting a Date
- Getting the Parts of a Formatted Date
- Formatting a Relative Date
- Formatting Numbers
- Rounding Decimal Places
- Formatting a Price Range
- Formatting Measurement Units
- Applying Pluralization Rules
- Counting Characters, Words, and Sentences
- Formatting Lists
- Sorting an Array of Names
- 12. Web Components
- 13. UI Elements
- 14. Device Integration
- 15. Measuring Performance
- 16. Working with the Console
- 17. CSS
- 18. Media
- 19. Closing Thoughts
- Index
- About the Author
Product information
- Title: Web API Cookbook
- Author(s):
- Release date: March 2024
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781098150693
You might also like
book
RESTful Web API Patterns and Practices Cookbook
Many organizations today orchestrate and maintain apps that rely on other people's services. Software designers, developers, …
book
Microservice APIs
Strategies, best practices, and patterns that will help you design resilient microservices architecture and streamline your …
book
The Design of Web APIs
The Design of Web APIs is a practical, example-packed guide to crafting extraordinary web APIs. Author …
book
AWS Cookbook
This practical guide provides over 70 self-contained recipes to help you creatively solve common AWS challenges …