Skip to content

Instantly share code, notes, and snippets.

@falsandtru
Last active April 19, 2019 02:04
Show Gist options
  • Save falsandtru/cdf4a19b70012b0d6e3c9e1ec021e557 to your computer and use it in GitHub Desktop.
Save falsandtru/cdf4a19b70012b0d6e3c9e1ec021e557 to your computer and use it in GitHub Desktop.
Example.
import { Shadow, HTML, El } from 'typed-dom';
class Component implements El {
private readonly dom = Shadow.section({
style: HTML.style(`ul { width: 100px; }`),
content: HTML.ul([
HTML.li(`item`),
]),
});
public readonly element = this.dom.element;
public get children() {
return this.dom.children.content.children;
}
public set children(children) {
this.dom.children.content.children = children;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment