Out of the four specifications created for Web Components, the Shadow DOM is one of the most powerful. The Shadow DOM allows the component author to create an encapsulated sub-DOM tree for their component. The latest version (V1) of the Shadow DOM specification introduces a new concept when creating a Shadow Root: the mode. To create a Shadow Root for an element you call the attachShadow method pr
![Open vs. Closed Shadow DOM](https://cdn-ak-scissors.b.st-hatena.com/image/square/af0f5a2b8de63b30a969cd9f34ffb35577050feb/height=288;version=1;width=512/https%3A%2F%2Fmiro.medium.com%2Fv2%2Fresize%3Afit%3A616%2F1%2AyzZe0-UV716LT4jh3Wn7aQ.png)