Web API cookbook
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 stil...
Otros Autores: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Sebastopol, CA :
O'Reilly Media, Inc
2024.
|
Edición: | First edition |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009798457006719 |
Tabla de Contenidos:
- Cover
- Copyright
- Table of Contents
- Preface
- The Power of Modern Browsers
- Drawbacks of Third-Party Libraries
- Who This Book Is For
- What's in This Book
- Additional Resources
- CanIUse.com
- MDN Web Docs
- Specifications
- Conventions Used in This Book
- Using Code Examples
- O'Reilly Online Learning
- How to Contact Us
- Acknowledgments
- Chapter 1. Asynchronous APIs
- 1.0 Introduction
- Callback Functions
- Events
- Promises
- 1.1 Working with Promises
- Problem
- Solution
- Discussion
- 1.2 Loading an Image with a Fallback
- Problem
- Solution
- Discussion
- 1.3 Chaining Promises
- Problem
- Solution
- Discussion
- 1.4 Using the async and await Keywords
- Problem
- Solution
- Discussion
- 1.5 Using Promises in Parallel
- Problem
- Solution
- Discussion
- 1.6 Animating an Element with requestAnimationFrame
- Problem
- Solution
- Discussion
- 1.7 Wrapping an Event API in a Promise
- Problem
- Solution
- Discussion
- Chapter 2. Simple Persistence with the Web Storage API
- 2.0 Introduction
- Getting and Setting Items
- Disadvantages
- 2.1 Checking for Web Storage Support
- Problem
- Solution
- Discussion
- 2.2 Persisting String Data
- Problem
- Solution
- Discussion
- 2.3 Persisting Simple Objects
- Problem
- Solution
- Discussion
- 2.4 Persisting Complex Objects
- Problem
- Solution
- Discussion
- 2.5 Listening for Storage Changes
- Problem
- Solution
- Discussion
- 2.6 Finding All Known Keys
- Problem
- Solution
- Discussion
- 2.7 Removing Data
- Problem
- Solution
- Discussion
- Chapter 3. URLs and Routing
- 3.0 Introduction
- Parts of a URL
- 3.1 Resolving a Relative URL
- Problem
- Solution
- Discussion
- 3.2 Removing Query Parameters From a URL
- Problem
- Solution
- Discussion
- 3.3 Adding Query Parameters to a URL
- Problem
- Solution
- Discussion
- 3.4 Reading Query Parameters
- Problem
- Solution
- Discussion
- 3.5 Creating a Simple Client-Side Router
- Problem
- Solution
- Discussion
- 3.6 Matching URLs to Patterns
- Problem
- Solution
- Discussion
- Chapter 4. Network Requests
- 4.0 Introduction
- 4.1 Sending a Request with XMLHttpRequest
- Problem
- Solution
- Discussion
- 4.2 Sending a GET Request with the Fetch API
- Problem
- Solution
- Discussion
- 4.3 Sending a POST Request with the Fetch API
- Problem
- Solution
- Discussion
- 4.4 Uploading a File with the Fetch API
- Problem
- Solution
- Discussion
- 4.5 Sending a Beacon
- Problem
- Solution
- Discussion
- 4.6 Listening for Remote Events with Server-Sent Events
- Problem
- Solution
- Discussion
- 4.7 Exchanging Data in Real Time with WebSockets
- Problem
- Solution
- Discussion
- Chapter 5. IndexedDB
- 5.0 Introduction
- Object Stores and Indexes
- Keys
- Transactions
- Requests
- 5.1 Creating, Reading, and Deleting Objects in a Database
- Problem
- Solution
- Discussion
- 5.2 Upgrading an Existing Database