blob: e0e7e6795d7a891fb243760f4207c63517f5c85d [file] [log] [blame]
<!doctype html>
<title>document.implementation.createDocument with current document's DOCTYPE</title>
<body>
FAIL (Script did not run);
<script>
document.body.textContent = "FAIL";
try {
document.implementation.createDocument(null, null, document.doctype);
document.body.textContent = "FAIL (no exception)";
}
catch(e) {
if (e.code === DOMException.WRONG_DOCUMENT_ERR || e.code === DOMException.NOT_SUPPORTED_ERR)
document.body.textContent = "PASS";
else
document.body.textContent = "FAIL (wrong exception: " + e.code + ")";
}
</script>