-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
The spec does say it's for Phrasing contents (which excludes header elements), but then allows them anyway.
Content model:
Phrasing content, optionally intermixed with heading content.
https://html.spec.whatwg.org/multipage/interactive-elements.html#the-summary-element
So the compile error for this code, does not follow the spec
let x: DOMTree<String> = html! {
<summary>
<h4>"test"</h4>
</summary>
};error[E0277]: the trait bound `h4<_>: axohtml::elements::PhrasingContent<_>` is not satisfied
--> src/main.rs:9:30
|
9 | let x: DOMTree<String> = html! {
| ______________________________^
10 | | <summary>
11 | | <h4>"test"</h4>
12 | | </summary>
13 | | };
| |_____^ the trait `axohtml::elements::PhrasingContent<_>` is not implemented for `h4<_>`
|This feels gnarly to carve out an exception in our type system, so I understand if this isn't high priority. It's not high priority for me either
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels