Convenient helper functions for working with
Html
wrapToSingleNode turns a list of Html nodes into a single node, using the following logic:
nothingdisplay: contentsMore on display: contents here: https://developer.mozilla.org/en-US/docs/Web/CSS/display#contents
nothing is a convenience function for the most idiomatic and common way to render nothing, namely an empty Html.text.
This function makes it easier to conditionally render Html.nodes. The most obvious usecase is similar to that of Attributes.classList, but for content rather than classes. Each entry in the list will be added and removed depending on the boolean value it is paired with.
For example, maybe we want to render a few animals: