Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alicewriteswrongs/declarative-shadow-dom-example

A little example vanilla web component using declarative shadow DOM
https://github.com/alicewriteswrongs/declarative-shadow-dom-example

Last synced: about 1 month ago
JSON representation

A little example vanilla web component using declarative shadow DOM

Awesome Lists containing this project

README

        

# Declarative Shadow DOM Example

This small project contains a web component that uses [declarative shadow
DOM](https://developer.chrome.com/en/articles/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:

```sh
npm i
npm start
```

Then you can gaze upon its unadulterated beauty:

Screenshot 2023-09-29 at 9 50 53 AM