Skip to content

Commit

Permalink
Add docs for <template>s content
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jul 24, 2017
1 parent bf09848 commit 97bf36c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,17 @@ interface Root <: Parent {
a `div`. HAST Elements corresponds to the [HTML Element][html-element]
interface.

One element is special, and comes with another property: `<template>` with
`content`. The contents of a template element is not exposed through its
`children`, like other elements, but instead on a `content` property which
houses a [`Root`][root] node.

```idl
interface Element <: Parent {
type: "element";
tagName: string;
properties: Properties;
content: Root?;
}
```

Expand Down Expand Up @@ -380,3 +386,5 @@ Yields:
[vfile]: https://github.com/vfile/vfile

[properties]: #properties

[root]: #root

0 comments on commit 97bf36c

Please sign in to comment.