Lighting up the Shadow DOM

Ishita Singh
JavaScript in Plain English
3 min readSep 25, 2019

--

I’m DOM, Shadow DOM

This is a basic introduction to what is a Shadow DOM and how ,when and why to use a Shadow DOM.

What is Shadow DOM?

In simple words, it’s a DOM inside a DOM.

Using Shadow Dom, you can attach a separate DOM tree which is hidden and encapsulated to any element. This is very helpful to achieve encapsulation in web components.

--

--