just the bare necessities of state management.
Hotlink it from https://unpkg.com/valoo.
| import { signal, effect } from "@preact/signals-core"; | |
| interface CustomStorage { | |
| getItem(key: string): void; | |
| setItem(key: string, value: string | null): void; | |
| } | |
| /** | |
| * A version of signal() that persists and recalls its value in localStorage. | |
| * |
| import { UserConfig } from "@11ty/eleventy"; | |
| import { DOMParser } from "@xmldom/xmldom"; | |
| import { transform } from "esbuild"; | |
| import { minify } from "html-minifier"; | |
| /** cache for content of script tags with an ID */ | |
| const scriptCache = new Map<string, string>(); | |
| /** DOM parser for navigating the rendered document; warnings are ignored */ | |
| const parser = new DOMParser({ errorHandler: { warning: () => {} } }); |
just the bare necessities of state management.
Hotlink it from https://unpkg.com/valoo.
I am moving this gist to a github repo so more people can contribute to it. Also, it makes it easier for me to version control.
Please go to - https://github.com/praveenpuglia/shadow-dom-in-depth for latest version of this document. Also, if you find the document useful, please shower your love, go ⭐️ it. :)
Heads Up! It's all about the V1 Spec.
In a nutshell, Shadow DOM enables local scoping for HTML & CSS.
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000