{"ScriptPreparationCode":"const tpl = document.createElement(\u0027template\u0027);\r\ntpl.innerHTML = \u0060\r\n\u003Cdiv\u003E\r\n \u003Ch1\u003EHeading\u003C/h1\u003E\r\n \u003Cp\u003EParagraph 1\u003C/p\u003E\r\n \u003Cp\u003EParagraph 2\u003C/p\u003E\r\n \u003Cbutton\u003EButton\u003C/button\u003E\r\n\u003C/div\u003E\r\n\u0060;\r\nconst el = tpl.content.firstElementChild\r\n\r\nfunction createByCloneNode() {\r\n return el.cloneNode()\r\n}\r\n\r\nfunction createByDocumentFragment() {\r\n const fragment = document.createDocumentFragment();\r\n\r\n const el = document.createElement(\u0027div\u0027);\r\n const heading = document.createElement(\u0027h1\u0027);\r\n const para1 = document.createElement(\u0027p\u0027);\r\n const para2 = document.createElement(\u0027p\u0027);\r\n const button = document.createElement(\u0027button\u0027);\r\n\r\n heading.innerText = \u0027Heading\u0027;\r\n para1.innerText = \u0027Paragraph 1\u0027;\r\n para2.innerText = \u0027Paragraph 2\u0027;\r\n button.innerText = \u0027Button\u0027;\r\n\r\n el.appendChild(heading);\r\n el.appendChild(para1);\r\n el.appendChild(para2);\r\n el.appendChild(button);\r\n\r\n fragment.appendChild(el);\r\n \r\n \treturn fragment\r\n}","TestCases":[{"Name":"cloneNode","Code":"for (var i = 0; i \u003C 1000; i\u002B\u002B) {\r\n document.documentElement.appendChild(createByCloneNode());\r\n}\r\n","IsDeferred":false},{"Name":"DocumentFragment","Code":"for (var i = 0; i \u003C 1000; i\u002B\u002B) {\r\n document.documentElement.appendChild(createByDocumentFragment());\r\n}","IsDeferred":false}]}