{"ScriptPreparationCode":null,"TestCases":[{"Name":"getAttribute only","Code":"var element = document.getElementById(\u0022foo\u0022);\r\nvar element2 = document.getElementById(\u0022bar\u0022);\r\nvar class_name;\r\nvar i = 1000;\r\nwhile (i--) {\r\n\tif (i % 2 === 0) {\r\n\t\tclass_name = element.getAttribute(\u0022class\u0022);\r\n } else {\r\n\t\tclass_name = element2.getAttribute(\u0022class\u0022);\r\n }\r\n}","IsDeferred":false},{"Name":"ternary typeof check to determine getAttribute or className","Code":"var element = document.getElementById(\u0022foo\u0022);\r\nvar element2 = document.getElementById(\u0022bar\u0022);\r\nvar class_name;\r\nvar i = 1000;\r\nwhile (i--) {\r\n \tif (i % 2 === 0) {\r\n\t\tclass_name = typeof element.className === \u0022object\u0022 ? element.getAttribute(\u0022class\u0022) : element.className;\r\n } else {\r\n \tclass_name = typeof element2.className === \u0022object\u0022 ? element2.getAttribute(\u0022class\u0022) : element2.className;\r\n }\r\n}","IsDeferred":false}]}