© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
A. LibbyBeginning Shadow DOM APIApress Pocket Guideshttps://doi.org/10.1007/979-8-8688-0249-2_2

2. Creating Components

Alex Libby1  
(1)
Belper, Derbyshire, UK
 

Over the last few pages, we started to explore the Shadow DOM API and how we might use it to encapsulate code into a feature or component. We created a couple of simple examples and covered some of the terms and functions available for use in this API.

This is all good, but what about using it in a practical context? The best way to do this is by writing components (or features) – while this book is about the Shadow DOM API, it forms the basis for creating web components, such as those offered in the ...

Get Beginning Shadow DOM API: Get Up and Running with Shadow DOM for Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.