{"ScriptPreparationCode":"window.ele = document.getElementById(\u0022test\u0022);\r\n\r\nwindow.SetStyle1 = (ele, json) =\u003E {\r\n const styleObject = ele.style;\r\n for (let key in json) {\r\n let value = json[key];\r\n styleObject[key] = value;\r\n }\r\n return ele;\r\n};\r\n\r\nwindow.SetStyle2 = (ele, json) =\u003E {\r\n const styleObject = ele.style;\r\n for (let key in json) {\r\n let value = json[key];\r\n styleObject.setProperty(key, value);\r\n }\r\n return ele;\r\n};\r\n\r\nwindow.SetStyle3 = (ele, json) =\u003E {\r\n let str = ele.style.cssText;\r\n for (let key in json) {\r\n let value = json[key];\r\n str \u002B= \u0060${key}:${value};\u0060;\r\n }\r\n ele.setAttribute(\u0027style\u0027, str);\r\n return ele;\r\n};\r\n\r\nwindow.SetStyle4 = (ele, json) =\u003E {\r\n let str = ele.style.cssText;\r\n for (let key in json) {\r\n let value = json[key];\r\n str \u002B= \u0060${key}:${value};\u0060;\r\n }\r\n ele.style.cssText = str;\r\n return ele;\r\n};\r\n\r\nwindow.myStyle = {\r\n color: \u0022red\u0022,\r\n border: \u00221vmin solid red\u0022,\r\n padding: \u00220.5vmin\u0022,\r\n \u0027background-color\u0027: \u0022black\u0022,\r\n height: \u00221vh\u0022,\r\n width: \u00221vw\u0022,\r\n left: \u0022100px\u0022,\r\n};","TestCases":[{"Name":"SetStyle1","Code":"let i = 0;\r\n\r\nwhile (i \u003C 100000) {\r\n SetStyle1(ele, myStyle);\r\n i\u002B\u002B;\r\n}","IsDeferred":false},{"Name":"SetStyle2","Code":"let i = 0;\r\n\r\nwhile (i \u003C 100000) {\r\n SetStyle2(ele, myStyle);\r\n i\u002B\u002B;\r\n}","IsDeferred":false},{"Name":"SetStyle3","Code":"let i = 0;\r\n\r\nwhile (i \u003C 100000) {\r\n SetStyle3(ele, myStyle);\r\n i\u002B\u002B;\r\n}","IsDeferred":false},{"Name":"SetStyle4","Code":"let i = 0;\r\n\r\nwhile (i \u003C 100000) {\r\n SetStyle4(ele, myStyle);\r\n i\u002B\u002B;\r\n}","IsDeferred":false}]}