title: Replacing all children of an HTMLElement?
body: <p>In my code, I fairly frequently need to replace all children of a certain HTML container with a new list of children.</p>
  
  <p>What is the fastest way to do this? My current approach is collecting all new elements into a DocumentFragment. The only way I've found to then actually replace the children is to remove all the children one by one, and append the fragment. Is there no faster way?</p>
  
  <p>Note: the solution needs not be cross-browser, but should preferably not require 3d-party components such as jQuery. The target-device is WebKit on a <em>very</em> slow CPU so I need to keep full control of any reflows.</p>