Skip to content

Commit

Permalink
chore: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thepassle committed Apr 3, 2024
1 parent 620eade commit ce229c7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,13 @@ Internally, the following object will be created:
Custom element renderers get passed this custom element object. A custom element renderer is an object with two methods on it: `match` and `render`. Here's an example:
```js
async function* render({tag, children, attributes}) {
yield `<${tag}>`
yield 'etc'
// etc
async function* render({tag, children, attributes}, renderChildren) {
yield `<${tag}>`;
yield `<template shadowroot="open" shadowrootmode="open">`;
yield `render shadow DOM`
yield `</template>`;
yield* renderChildren(children);
yield `</${tag}>`;
}
export const fooRenderer = {
Expand Down

0 comments on commit ce229c7

Please sign in to comment.