As best I can intuit, I would like a bi-directional tree-like structure. Here is an aspect of my app that might clarify my need.
The app I am working on is a tool to help school nurses manage individual health plans for students. Nurses have many students. Students have many plans. Plans have many conditions. Conditions have many details. Student data has to be stored separately for privacy reasons.
Adding a condition to a plan actually means 1) choosing a boilerplate item from a separate database, 2) making that available to the view model that has the data model received from the server, and 3) creating a new plan item based on that boilerplate and 4) pushing it into that plan.
There are a lot of conditions (asthma, stomach ulcers, etc) and a normal menu selector won’t work for choosing the boilerplate item. Instead, I have a tool that (eventually) allows typing a partial string and other methods of shortening the list so a nurse can find the right thing. This tool needs to know what conditions have already been selected so that the nurse doesn’t add them twice.
I have constructed the selector to allow the addition of widgets (mainly for filtering). One widget (component) is the one that presents the list of boilerplate items. It needs to know, for each item, whether there is already an element in the plan derived from that boilerplate.
The connection of the plan item source id and the boilerplate item is something that might have been done with a join in a SQL based implementation. For Javascript, I obviously have to loop over the plans conditions to match with boilerplates. To do that, I need to gain access to the plan view model which is some arbitrary distance above the listing component in the hierarchy.
Importantly, the plan view model is not %root. This application does other things (eg, enter and edit boilerplate), the plan view model is held by a component named ‘nurse’. While the component makes %root available to everyone, I have had to adopt the practice of explicitly sending a ‘planRootVm’ to the subordinate components.
At first, I did plan-root-vm=’{.}’ or plan-root-vm=’{…/…/}’, etc, depending on where in the hierarchy the component in question is. This is where the brittleness I spoke of comes in. Now, all subordinate components get plan-root-vm=’{planRootVm}’. (This makes it essentially a global so I feel dirty.)
So, the bottom line of this probably too long story, is that I have had to do things that feel to me like hackery to get access to intermediate (ie, non %root) plan data model (there are other examples, too). I think that it is probably something that you are trying to address with your bi-directional tree-like structures though the analogy to childNode.parentNode seems like the english expression of “…/”, and thus potentially brittle. The phrase “make sure all children have easy access to their parent”, however, exactly expresses the problem that needs solving.