Beginning Shadow DOM API : Get Up and Running with Shadow DOM for Web Applications [1 ed.] 9798868802492, 9798868802485

Leverage the power of the Shadow DOM API to quickly create encapsulated code that keeps markup and styles separate withi

126 62 2MB

English Year 2024

Report DMCA / Copyright

DOWNLOAD EPUB FILE

Table of contents :
Table of Contents
About the Author
About the Technical Reviewer
Acknowledgments
Introduction
Chapter 1: Getting Started
Exploring the Different DOM Types
Creating a Simple Example
Understanding What Happened
Some High-Level Concepts
Breaking Apart the Demo Code
Considering the Bigger Picture
Understanding Terminology Around the API
Creating the Component – A Process
Browser Support for the API
Practical Considerations for using the API
Composition Using Slots and Templates
Breaking Apart the Code Changes
Using Slots and Templates – A Postscript
Applying Styles – What's Different?
Summary
Chapter 2: Creating Components
Creating an Alert Dialog
Constructing the Markup
Understanding What Happened
Creating a Toggle Switch
Breaking Apart the Changes
Constructing the Demo
Breaking Apart the Code
Testing the Components
Understanding What Happened
Packaging the Component for Release
Breaking Apart the Code Changes
Publishing the Component – A Postscript
Summary
Chapter 3: Applying Shadow DOM API in Apps
Working with Styling Frameworks
Exploring the Code Changes
Mounting a React App Using Shadow DOM API
Understanding What Happened
Implications of SEO and the API
Comparing with Bing
Challenges with Server-Side Rendering – A Postscript
Summary
Chapter 4: Supporting Other Frameworks
Adding Shadow DOM API Support to React Components
Breaking Apart the Code Changes
Exploring Other Framework Examples
First Example: Using Svelte
Exploring the Code in Detail
Second Example: Exploring Alpine.js
Understanding the Changes
Assessing Performance of the API
Will Web Components Replace Tools Such As React?
And Now for Something Completely Different…
Summary
Appendix: API Reference
Interfaces
Properties
Methods
Index

Beginning Shadow DOM API : Get Up and Running with Shadow DOM for Web Applications [1 ed.]
 9798868802492, 9798868802485

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
Recommend Papers