{"ScriptPreparationCode":"var test_element = document.getElementById(\u0022foo\u0022);","TestCases":[{"Name":"Use hasClass shorthand","Code":"function hasClass(element, classes) {\r\n classes = classes.split(\u0027 \u0027);\r\n for (var i = 0; i \u003C classes.length; i\u002B\u002B) {\r\n if (!element.classList.contains(classes[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n};\r\n\r\nhasClass(test_element, \u0022bar baz\u0022);","IsDeferred":false},{"Name":"Use classList","Code":"test_element.classList.contains(\u0022bar\u0022);\r\ntest_element.classList.contains(\u0022baz\u0022);","IsDeferred":false}]}