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

1. Getting Started

Alex Libby1  
(1)
Belper, Derbyshire, UK
 

Coding is a messy business. Ouch. Why?

We all work on projects – some for clients, some for personal development; chances are we need to apply fixes to our code at some point, then apply fixes on fixes. Very soon, things become messy and unmanageable – sound familiar?

We need a different approach – one way to achieve this is to create components or modules that serve a single responsibility, such as a custom button. We can encapsulate modular code, so we don’t need to worry about how it all works inside: pass ...

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.