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: