{"ScriptPreparationCode":"var str = \u0060\u003Cdiv\u003E${Math.random().toString().slice(2)}\u003C/div\u003E\u0060;\r\nvar container = document.getElementById(\u0022container\u0022);\r\nvar temp = document.createElement(\u0027template\u0027)\r\nvar res = \u0027\u0027;\r\nfor(i=0; i\u003C30000; i\u002B\u002B){\r\n\tres \u002B= str\r\n}\r\ntemp.innerHTML = res;\r\n\r\nvar div = document.createElement(\u0027div\u0027)\r\ncontainer.appendChild(div);\r\ndiv.innerHTML = res;","TestCases":[{"Name":"cloneNode(true) - While -\u003E Remove","Code":"while (div.firstChild) {\r\n div.removeChild(div.firstChild);\r\n}\r\ndiv.append(temp.content.cloneNode(true)); ","IsDeferred":false},{"Name":"innerHTML","Code":"div.innerHTML = res;","IsDeferred":false},{"Name":"cloneNode(true) - replaceChildren","Code":"div.replaceChildren(temp.content.cloneNode(true)); ","IsDeferred":false},{"Name":"cloneNode(true) - replace whole div","Code":"const newDiv = div.cloneNode(false);\r\nnewDiv.append(temp.content.cloneNode(true));\r\ndiv.parentNode.replaceChild(newDiv, div);\r\ndiv = newDiv;","IsDeferred":false}]}