{"ScriptPreparationCode":"var component = {\r\n\tname: \u0027Hello World\u0027,\r\n input: \u0027Some text\u0027,\r\n buttonName: \u0027Click Me\u0027,\r\n buttonCallback: function(event){\r\n \tconsole.log(this);\r\n var data = \u0027test\u0027;\r\n }\r\n};\r\n\r\nfunction testA(comp){\r\n\tconsole.log(comp);\r\n\tvar div = document.createElement(\u0027div\u0027);\r\n \r\n var label = document.createElement(\u0027label\u0027);\r\n label.textContent = comp.name;\r\n \r\n var button = document.createElement(\u0027button\u0027);\r\n button.textContent = comp.buttonName;\r\n button.addEventListener(\u0027click\u0027, comp.buttonCallback.bind(comp));\r\n\r\n\tvar input = document.createElement(\u0027input\u0027);\r\n input.type = comp.input;\r\n input.value = comp.input;\r\n\r\n\tdiv.appendChild(label);\r\n\tdiv.appendChild(button);\r\n\tdiv.appendChild(input);\r\n\r\n\treturn div;\r\n}\r\n\r\nfunction testB(){\r\n\tvar tmp = document.createElement(\u0027div\u0027);\r\n var html = \u0027\u003Cdiv\u003E\u003Clabel\u003E\u003C/label\u003E\u003Cbutton\u003E\u003C/button\u003E\u003Cinput\u003E\u003C/div\u003E\u0027;\r\n \r\n tmp.innerHTML = html;\r\n \r\n\treturn tmp.firstChild;\r\n}\r\n\r\nvar testCData = testB();\r\nfunction testC(comp){\r\n\tvar a = testCData.cloneNode(true);\r\n\r\n var label = a.querySelectorAll(\u0027label\u0027)[0];\r\n label.textContent = comp.name;\r\n \r\n var button = a.querySelectorAll(\u0027button\u0027)[0];\r\n button.textContent = comp.buttonName;\r\n button.addEventListener(\u0027click\u0027, comp.buttonCallback.bind(comp));\r\n\r\n\tvar input = a.querySelectorAll(\u0027input\u0027)[0];\r\n input.type = comp.input;\r\n input.value = comp.input;\r\n \r\n\treturn a;\r\n}","TestCases":[{"Name":"A","Code":"testA(component);","IsDeferred":false},{"Name":"C","Code":"testC(component);","IsDeferred":false}]}