alicewriteswrongs / declarative-shadow-dom-example

A little example vanilla web component using declarative shadow DOM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Declarative Shadow DOM Example

This small project contains a web component that uses declarative shadow DOM. This lets it render some UI before the JS associated with it is loaded. Then the JS renders some different UI based on whether or not it's "taking over" from an instance which already had a declarative shadow root present in the html.

To run the project do:

npm i
npm start

Then you can gaze upon its unadulterated beauty:

Screenshot 2023-09-29 at 9 50 53 AM

About

A little example vanilla web component using declarative shadow DOM


Languages

Language:JavaScript 57.9%Language:HTML 42.1%