[rdom] Why is every node - SPAN wrapped? #470
-
compiles to:
waiting for the result:
Do I understand correctly that rdom is not compatible with hiccup semantics? example:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
@bt-3000 First off, rdom is hiccup compatible, but always requires the "normalized" form, i.e. The In any case, were you just asking out of interest or do you have a particular issue with these spans? |
Beta Was this translation helpful? Give feedback.
-
found an example where it doesn't fit
rendered
|
Beta Was this translation helpful? Give feedback.
-
@bt-3000 Unless I'm missing something here in your example, this looks exactly as intended (i.e. only non-element values or directly embedded reactive values will be span-wrapped)...
|
Beta Was this translation helpful? Give feedback.
@bt-3000 First off, rdom is hiccup compatible, but always requires the "normalized" form, i.e.
[tag, attribs, ...children]
. See$tree()
and$compile()
...The
<span>
are used as wrappers since elements can have multiple text children, each of which might need to be updated individually. I'm aware these text nodes could have been created viadocument.createTextNode()
but current approach is more uniform (and there might have been some other issues whose details escape me right now...) Can all be revisited if needed...In any case, were you just asking out of interest or do you have a particular issue with these spans?