{"ScriptPreparationCode":"const makeClassed = (tag) =\u003E (className, textContent) =\u003E {\r\n const el = document.createElement(tag);\r\n el.classList.add(className);\r\n if (textContent !== undefined) {\r\n el.textContent = textContent;\r\n }\r\n return el;\r\n};\r\n\r\nconst makeSpan = makeClassed(\u0022span\u0022);\r\nvar makeDiv = makeClassed(\u0022div\u0022);\r\n\r\nvar target = document.getElementById(\u0022target\u0022)\r\nvar group = {\r\n number: 42\r\n}","TestCases":[{"Name":"createContextualFragment","Code":"const fragment = document.createRange().createContextualFragment(\u0060\r\n \u003Cdiv class=\u0022group-before\u0022\u003E\u0413\u0440\u0443\u043F\u043F\u0430 ${group.number}\u003C/div\u003E\r\n \u003Cdiv class=\u0022group-toggle\u0022\u003E-\u003C/div\u003E\r\n \u003Cdiv class=\u0022rows-container\u0022\u003E\u003C/div\u003E\r\n\u0060);\r\nconst toggle = fragment.querySelector(\u0027.group-toggle\u0027);\r\nconst rows = fragment.querySelector(\u0027.rows-container\u0027);\r\ntarget.appendChild(fragment);\r\n","IsDeferred":false},{"Name":"appendChild","Code":"const groupBefore = makeDiv(\u0027group-before\u0027, \u0060\u0413\u0440\u0443\u043F\u043F\u0430 ${group.number}\u0060);\r\nconst groupToggle = makeDiv(\u0027group-toggle\u0027, \u0027-\u0027);\r\nconst rows = makeDiv(\u0027rows-container\u0027);\r\ntarget.appendChild(groupBefore);\r\ntarget.appendChild(groupToggle);\r\ntarget.appendChild(rows);\r\n","IsDeferred":false}]}