© 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_3

3. Applying Shadow DOM API in Apps

Alex Libby1  
(1)
Belper, Derbyshire, UK
 

Throughout this book, we’ve focused on creating components that use the Shadow DOM API – it’s perfect for encapsulating styles, controlling what we can and can’t override, and generally maintaining consistency – rather than letting others run roughshod over your pride and joy!

There is one thing, though – what about using the API generally in sites outside of components? As developers, we would probably create some form of component, but there may be occasions where you want to create something ...

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.