{"ScriptPreparationCode":"const dest = document.getElementById(\u0027dest\u0027);\r\nfunction escapeHtml(unsafe)\r\n{\r\n return unsafe\r\n .replace(/\u0026/g, \u0022\u0026amp;\u0022)\r\n .replace(/\u003C/g, \u0022\u0026lt;\u0022)\r\n .replace(/\u003E/g, \u0022\u0026gt;\u0022);\r\n }","TestCases":[{"Name":"insertAdjacentHTML\u002BtextContent","Code":"dest.innerHTML = \u0022\u0022;\r\nfor(var i=0; i\u003C1000; \u002B\u002Bi){\r\n dest.insertAdjacentHTML(\u0022beforeend\u0022, \u0022\u003Cp\u003E\u003C/p\u003E\u0022);\r\n dest.lastChild.textContent = \u0060Hello ${i} \u0026 hello again.\u0060;\r\n}","IsDeferred":false},{"Name":"escape\u002BinsertAdjacentHTML","Code":"var html = \u0022\u0022;\r\nfor(var i=0; i\u003C1000; \u002B\u002Bi){\r\n html \u002B= \u0060\u003Cp\u003E${escapeHtml(\u0060Hello ${i} \u0026 hello again.\u0060)}\u003C/p\u003E\u0060;\r\n}\r\ndest.innerHTML = html;","IsDeferred":false},{"Name":"insertAdjacentHTML\u002BtextContent w/ lastElementChild","Code":"dest.innerHTML = \u0022\u0022;\r\nfor(var i=0; i\u003C1000; \u002B\u002Bi){\r\n dest.insertAdjacentHTML(\u0022beforeend\u0022, \u0022\u003Cp\u003E\u003C/p\u003E\u0022);\r\n dest.lastElementChild.textContent = \u0060Hello ${i} \u0026 hello again.\u0060;\r\n}","IsDeferred":false}]}