Status: FAIL | Duration: 46ms | Subtests: 0/1 | Open test on wpt.live | wpt.fyi
/svg/types/scripted/SVGElement.className-01.svg
<svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml"> <title>SVGElement.prototype.className: Reflects to .classList</title> <h:link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/types.html#__svg__SVGElement__className"/> <h:script src="/resources/testharness.js"/> <h:script src="/resources/testharnessreport.js"/> <script> test(() => { const element = document.createElementNS('http://www.w3.org/2000/svg', 'g'); assert_false(element.classList.contains('one'), "classList is initially empty"); element.className.baseVal = 'one'; assert_true(element.classList.contains('one'), "className should reflect to classList"); }); </script> </svg>