diff --git a/README.md b/README.md index df71028..2e014be 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ const SPEC = { element: { input: 'input.name', // refs.input: HTMLInputElement | null (from the tag) thing: '.thing', // refs.thing: Element | null (no tag to go on) - card: ['.card', HTMLElement], // refs.card: HTMLElement | null (checked with instanceof) + card: ['.card', HTMLElement], // refs.card: HTMLElement | null (throws if a match isn't one) }, elements: { buttons: 'button' }, // refs.buttons: HTMLButtonElement[] props: { @@ -45,7 +45,7 @@ ExampleElement.observedAttributes; // readonly ('user-id' | 'min' | 'is-ready' | - **Codecs**: `string`, `number`, `enable`, `disable`, `choice([...])`, `json()`, `prop({ default, decode, encode })`. - **Shadow DOM**: `shadow` attaches a root and clones `template` into it; `css` is a shared adopted stylesheet. An existing declarative shadow root is used instead (and `shadow`/`template` are ignored). `root` is the shadow root (even when closed) or the element itself. - **Light DOM**: `template` is appended on first connect; `css` is added once per element type, as a `