There are a few places where I've needed to access the parent node of a node. It is possible to do this by accessing the rootNode and traversing children, but is inefficient and not obvious. Would there be any downside in setting a mountedNode's parent on it as parentNode?
Let's take a look at node building libraries like nokogiri and learn from them about creating and maintaining parent-child relationships and use that to guide implementation.
There are a few places where I've needed to access the parent node of a node. It is possible to do this by accessing the rootNode and traversing children, but is inefficient and not obvious. Would there be any downside in setting a mountedNode's parent on it as
parentNode
?