OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <meta charset=utf-8> |
| 3 <title>DOMTokenList stringifier</title> |
| 4 <link rel=help href="https://dom.spec.whatwg.org/#dom-domtokenlist-stringifier"> |
| 5 <link rel=author title=Ms2ger href="mailto:Ms2ger@gmail.com"> |
| 6 <script src="../../../../resources/testharness.js"></script> |
| 7 <script src="../../../../resources/testharnessreport.js"></script> |
| 8 <div id=log></div> |
| 9 <span class=" a a b"></span> |
| 10 <script> |
| 11 test(function() { |
| 12 var span = document.querySelector("span"); |
| 13 assert_equals(span.getAttribute("class"), " a a b", |
| 14 "getAttribute should return the literal value"); |
| 15 assert_equals(span.className, " a a b", |
| 16 "className should return the literal value"); |
| 17 assert_equals(String(span.classList), "a b", |
| 18 "String(classList) should compress whitespace"); |
| 19 assert_equals(span.classList.toString(), "a b", |
| 20 "classList.toString() should compress whitespace"); |
| 21 assert_class_string(span.classList, "DOMTokenList"); |
| 22 }); |
| 23 </script> |
OLD | NEW |