Changing new DocumentFragment to document.createDocumentFragment