implement documentFragment in JS