DEV Community

Cover image for Shadow DOM API
sahra 💫
sahra 💫 Subscriber

Posted on

5 4 4 4 3

Shadow DOM API

This is a submission for DEV Challenge v24.03.20, One Byte Explainer: Browser API or Feature.

Explainer

The shadow DOM API creates an encapsulated DOM tree attached to an element in the actual DOM known as the shadow host.

The nodes in this tree are invisible to CSS and JS except when referenced by the shadowRoot property.

Additional Context

This allows you to create nodes without breaking elements in the actual DOM, which can be used to provide additional features to custom elements.

Top comments (0)

Visualizing Promises and Async/Await 🀓

async await

☝ Check out this all-time classic DEV post on visualizing Promises and Async/Await 🀓

👋 Kindness is contagious

Please leave a ❀ or a friendly comment on this post if you found it helpful!

Okay