New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yew-macro: Make self-closing slash optional for void elements #990
Comments
From the specification you're linking, the void elements are the following:
Personally, I'm not a big fan of allowing this, because it looks to me that it's pure laziness that became standard. IMO implementing this would complicate the |
As I understand it, XHTML was oriented toward XML and HTML5(tm) is oriented toward SGML, wherein subtle differences in void and element closing exist. https://stackoverflow.com/a/3558200 is a primer. Irrespective, questioning the spec is out of scope here at least for myself. I don't know if the intent of the A more helpful error message would be appreciated. |
We can revisit the trailing slash issue later I think. For now, we should not allow void elements to have children. We can compile time check this with the proc macro. |
Related: #1217 |
Problem
Void Elements
From https://html.spec.whatwg.org/multipage/syntax.html#start-tags:
The "/" of
<br/>
is optional per the spec however Yew'shtml!
macro requires it.Questionnaire
The text was updated successfully, but these errors were encountered: