3 ms·
> Huh, didn’t know that. It’s the sort of thing that makes me wonder, “hmm, was that what was happening that time all those years ago?” I think it was always a
by itsbits 5y ago
> Huh, didn’t know that. It’s the sort of thing that makes me wonder, “hmm, was that what was happening that time all those years ago?”
I think it was always a graph. I remember reading DOM implementation years ago, where a node will have siblings references as well making it graph DS.
- chrismorgan 5y agoSure, you’ve always been able to access siblings directly from nodes, rather than having to go up and down again, but that’s just a shortcut rather than being an inherent part of the logical data structure, since nodes don’t own their siblings, but rather their siblings are computed from their parent’s children. This here is talking about the DOM actually producing a non-tree structure, where one text node is a child of multiple elements.
- itsbits 5y agocheck this implementation https://blogs.windows.com/msedgedev/2017/04/19/modernizing-dom-tree-microsoft-edge/ https://blogs.windows.com/msedgedev/2017/04/19/modernizing-d... graph doesn't mean multiple parents all the time. if you have references of other nodes in current node data(not just as children) as long as you can travel across Data structure, enough to say it as graph structure.