blob: 7ec8318c9dda2b0ce5118fc28f37f7217b87040a [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<link rel="help" href="http://www.w3.org/TR/2012/WD-dom-20121206/#dom-domimplementation-createdocumenttype">
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Tests that DOMImplementation.createDocumentType() properly sets the node's document to the associated document of the context object.");
var docType = document.implementation.createDocumentType("html", null, null);
shouldBe("docType.ownerDocument", "document");
var newDocument;
shouldNotThrow("newDocument = document.implementation.createDocument('', null, docType)");
shouldBe("newDocument.doctype", "docType");
shouldBe("newDocument.doctype.ownerDocument", "newDocument");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>