How can I append DOM elements as they stream in from the network?
I have an element that I want to populate as a request's HTML streams in, instead of waiting for the complete response. This turned out to be incredibly difficult. Things I've tried: 1. milestoneNode.insertAdjacentHTML('beforebegin', text) Be lovely if this worked. Unfortunately, elements with quirky parsing wreck it — such as <p> and <table> . The resulting DOM can be charitably described as Dada. 2. Using a virtual DOM/DOM update management library Google's incremental-dom seemed most promising, but its patch() operation always restarts from the beginning of the container node. Not sure how