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
Invalid HTML is not reported by Vue #9059
Comments
As you can imagine, we cannot add every HTML rule to the html parser. In this scenario, it would require it to be handled by the template compiler and display an error in the terminal |
Actually it's not only a compile time thing. You can generate wrongly structured VDOM nodes at runtime. If we are gonna warn about this, it would be quite expensive because we'll have to check the VDOM structure upon each update. I do think this is something nice to have, and I think it's possible to make some userland plugins to perform runtime validation (leveraging tools like ecomfe/html-nest-rule) with the |
@posva i notice react can handle errors like this. But if we can't, okay. |
Version
2.5.16
Reproduction link
https://codesandbox.io/s/vj83wp3jz0
Steps to reproduce
<p><div></div></p>
What is expected?
Got readble error with explanations
What is actually happening?
Got unreadble errors.
In vue chat newbie write about problem with slots. I notice wrong html markup, div in p. But i think vue must not die with unreadble errors if he got wrong html markup in slot.
The text was updated successfully, but these errors were encountered: