Skip to content

Commit 97bf36c

Browse files
committed
Add docs for <template>s content
1 parent bf09848 commit 97bf36c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: readme.md

+8
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,17 @@ interface Root <: Parent {
167167
a `div`. HAST Elements corresponds to the [HTML Element][html-element]
168168
interface.
169169

170+
One element is special, and comes with another property: `<template>` with
171+
`content`. The contents of a template element is not exposed through its
172+
`children`, like other elements, but instead on a `content` property which
173+
houses a [`Root`][root] node.
174+
170175
```idl
171176
interface Element <: Parent {
172177
type: "element";
173178
tagName: string;
174179
properties: Properties;
180+
content: Root?;
175181
}
176182
```
177183

@@ -380,3 +386,5 @@ Yields:
380386
[vfile]: https://github.com/vfile/vfile
381387

382388
[properties]: #properties
389+
390+
[root]: #root

0 commit comments

Comments
 (0)