Add example to docs of custom element ()

* Add example to docs of custom element

* incorporate feedback
This commit is contained in:
brian 2020-05-28 13:04:19 +07:00 committed by GitHub
parent 4d1f18ad8b
commit 240ecf03b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,6 +79,20 @@ Before version 0.18, Maud allowed the curly braces to be omitted. This syntax wa
[#137]: https://github.com/lambda-fairy/maud/pull/137
## Non-standard HTML ("custom") elements
Maud is not restricted to writing well-known HTML elements like `h1`, `p`, `span`, etc. If you want to use [custom elements][custom-elements], you can.
```rust
html! {
blog-post {
title { "My blog" }
}
}
```
[custom-elements]: https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements
## Non-empty attributes `id="yay"`
```rust