Hello, World
{"ScriptPreparationCode":"var parent = document.getElementById(\u0027test\u0027);\r\n\r\nvar setTextContent1 = Object.getOwnPropertyDescriptor(Node.prototype, \u0027textContent\u0027).set;\r\n\r\nvar nodeFirstChild = Object.getOwnPropertyDescriptor(Node.prototype, \u0027firstChild\u0027).get;\r\nvar nodeLastChild = Object.getOwnPropertyDescriptor(Node.prototype, \u0027lastChild\u0027).get;\r\nvar setTextContent2 = (node, text) =\u003E {\r\n if (text) {\r\n const firstChild = nodeFirstChild.call(node);\r\n if (\r\n firstChild \u0026\u0026 firstChild.nodeType === 3 /** TEXT_NODE */ \u0026\u0026 firstChild === nodeLastChild.call(node)\r\n ) {\r\n firstChild.nodeValue = text;\r\n return;\r\n }\r\n }\r\n node.textContent = text;\r\n}","TestCases":[{"Name":"set textContent","Code":"parent.textContent = \u0027Hello, Sukka\u0027;","IsDeferred":false},{"Name":"cached textContent prototype","Code":"setTextContent1.call(parent, \u0027Hello, Million\u0027);","IsDeferred":false},{"Name":"avoid remove the existing node and create a new one","Code":"setTextContent2(parent, \u0027Hello, Performance\u0027);","IsDeferred":false}]}