{"ScriptPreparationCode":"var elements = [document.createElement(\u0027div\u0027), document.createElement(\u0027div\u0027)];\r\nvar fragment = document.createDocumentFragment();\r\nvar container = document.getElementById(\u0027container\u0027);\r\n\r\nelements.forEach(element =\u003E fragment.appendChild(element));\r\ncontainer.appendChild(fragment);","TestCases":[{"Name":"replaceChild","Code":"var changeIndex = 1;\r\nelements[changeIndex] = document.createElement(\u0027div\u0027);\r\ncontainer.replaceChild(elements[changeIndex], container.children[changeIndex]);","IsDeferred":false},{"Name":"replaceChildren","Code":"var changeIndex = 1;\r\nelements[changeIndex] = document.createElement(\u0027div\u0027);\r\ncontainer.replaceChildren(elements)","IsDeferred":false},{"Name":"append documentFragment","Code":"var changeIndex = 1;\r\nvar newChildren = document.createDocumentFragment();\r\n\r\nelements[changeIndex] = document.createElement(\u0027div\u0027);\r\nelements.forEach(element =\u003E newChildren.appendChild(element));\r\n\r\nwhile(container.firstChild) {\r\n container.firstChild.remove(); \r\n}\r\n\r\ncontainer.appendChild(newChildren)","IsDeferred":false}]}