No way to modify a tag name?
netvl opened this issue · comments
Currently, as far as I can see, the name
property on a node is read-only. This means that there is no way to modify the tag name, e.g. to change div
to p
. Maybe there is a simpler way around that than rebuilding a tree?
Right, I didn’t wrap name
in a cell so that reading it didn’t need to go through some cell API. That seemed OK since it’s read-only in the DOM too. You can rebuild one element without rebuilding the whole tree: appending a child node to the new parent implicitly detaches it from the old parent and moves the whole subtree.
I will soon archive this repository and make it read-only, so this issue will not be addressed: https://github.com/kuchiki-rs/kuchiki#archived