I should be able to use `_class`, `_data` and `_tooltip` more widely
Summary: These functions only work on HTML, which makes sense. But you often want to use them on other sorts of Things, specifying attributes they will have post-rendering. That is remarkably hard to express at this point.
The fix, I think, is that if these functions receive a value other than HTML, they immediately render that value -- in Scala terms, instead of having type HTML
, they have type => HTML
. I suspect there are some edge cases, but it generally seems to work.
Note that we need to do the rendering as .raw
in order for this to work -- we have to suppress the surrounding para.