OLD | NEW |
(Empty) | |
| 1 <!-- comment --> |
| 2 <!doctype html> |
| 3 <meta charset=utf-8> |
| 4 <title>Document.doctype</title> |
| 5 <link rel=help href="https://dom.spec.whatwg.org/#dom-document-doctype"> |
| 6 <script src="../../../../resources/testharness.js"></script> |
| 7 <script src="../../../../resources/testharnessreport.js"></script> |
| 8 <div id="log"></div> |
| 9 <script> |
| 10 test(function() { |
| 11 assert_true(document.doctype instanceof DocumentType, |
| 12 "Doctype should be a DocumentType"); |
| 13 assert_equals(document.doctype, document.childNodes[1]); |
| 14 }, "Window document with doctype"); |
| 15 |
| 16 test(function() { |
| 17 var newdoc = new Document(); |
| 18 newdoc.appendChild(newdoc.createElement("html")); |
| 19 assert_equals(newdoc.doctype, null); |
| 20 }, "new Document()"); |
| 21 </script> |
OLD | NEW |