Skip to content

[rdom] Why is every node - SPAN wrapped? #470

Answered by postspectacular
bt-3000 asked this question in Q&A
Discussion options

You must be logged in to vote

@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 via document.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?

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@bt-3000
Comment options

Answer selected by bt-3000
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants