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
Element functions are part of a separate package but the core has knowledge over tags and what tag is a void element which is strange to me. How about creating a new function VoidEl or adding an extra param to existing function before children? This way the element function itself can decide if it is a void element or not.
The text was updated successfully, but these errors were encountered:
Since the core package is all about writing HTML5, I think it's fine to have void element knowledge there. Everything in package html is just helpers. You could use just the gomponents package to write your HTML and be fine. Having a VoidEl would move the burden of deciding which HTML5 elements are void elements to the API user, and I'd rather have the library decide that for them.
(Thanks for all the feedback, even if I don't agree. 😊)
I understand your reasoning and acknowledge your point about burdening the user with deciding which HTML5 elements are void elements. Furthermore there are not many void elements anyway and the project is a html5 rendering package.
Element functions are part of a separate package but the core has knowledge over tags and what tag is a void element which is strange to me. How about creating a new function
VoidEl
or adding an extra param to existing function before children? This way the element function itself can decide if it is a void element or not.The text was updated successfully, but these errors were encountered: