OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>title.text with comment and element children.</title> |
| 3 <link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> |
| 4 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-title-text"> |
| 5 <script src="../../../../../../resources/testharness.js"></script> |
| 6 <script src="../../../../../../resources/testharnessreport.js"></script> |
| 7 <div id="log"></div> |
| 8 <script> |
| 9 try { |
| 10 var title = document.getElementsByTagName("title")[0]; |
| 11 while (title.childNodes.length) |
| 12 title.removeChild(title.childNodes[0]); |
| 13 title.appendChild(document.createComment("COMMENT")); |
| 14 title.appendChild(document.createTextNode("TEXT")); |
| 15 title.appendChild(document.createElement("a")) |
| 16 .appendChild(document.createTextNode("ELEMENT")) |
| 17 } catch (e) { |
| 18 } |
| 19 </script> |
| 20 <script> |
| 21 test(function() { |
| 22 assert_equals(title.text, "TEXT"); |
| 23 assert_equals(title.textContent, "TEXTELEMENT"); |
| 24 }) |
| 25 </script> |
OLD | NEW |