You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because your example is not valid html. Custom tags cannot be self-closing, they always need a closing tag. A slash in the tag name is only allowed for void elements, which custom elements are not.
See: https://www.w3.org/TR/html/syntax.html#start-tags
@impworks Nevertheless thanks for reporting this, this is a quite common confusion.
Thank you for the reply.
You are right - the spec says that all custom tags must be explicitly closed.
I found out that my issue can be fixed by using the keepClosingSlash option in HTML Minifier.
While the resulting code is technically incorrect, it does work in Chrome and is quite convenient to write for testing purposes.
Would be nice if HTML Minifier issued a warning though.
When using a self-closing tag in the included template, the slash is lost in the output, For example:
template.html
:control.js
:Result:
The text was updated successfully, but these errors were encountered: