Basic demonstration of building a web component using vanilla JavaScript compared to LitElement.
Also integrates some visual diff testing.
- Vanilla Custom Elements Overview
- Open-WC Project
- Polyfill
- LitElement
- LitHtml
- Custom Elements Everywhere
Clone the repo and run:
npm installTo start a development server that hosts the demos, run:
npm run startThen visit the URL output to the console.
By default, index.html loads the vanilla web component (vanilla.js). To use Lit instead, switch it to load lit.js.
To set a baseline set of golden screenshots, run:
npm run visual-diff:goldenTo compare against the goldens, run:
npm run visual-diff