Message from JavaScript discussions
May 2017
— Or using innerHTML
a ton and no node-mutating methods as if they are working with HTML only, which isn't the case, but there are so many people who assume HTML is as tightly married to the DOM as a live element
Fact is HTML has very little to do with what's in the actual DOM and every time you work with it you are making the DOM do backflips you could avoid just by talking to it directly, stuff like hyperspeed document fragments
— So while I want improvements I think the majority of developers may wind up ignoring them
— Just need to invent an entirely new platform
— Well, it's easy enough to tack on your own code to the DOM
— It is a somewhat simple structure of objects, and the builtins perform simple tasks
— Sure, but it's still a giant bloaty mess
— Quite, with a lot of messy circulars
— You would need an agent-based model for traversing it, which in fact traverses a simpler, simulated version of the DOM, but mutates the real DOM
— A stack & map would suffice, with the stack representing totality of information and the map representing the relationships
— Then, operations like querySelectorAll
can linearly operate on the stack with quite good performance
— I think at that point you could stick stream fusion in there too which would make large DOM's very fast