createDocument-with-used-doctype-frame.html revision eff69b907ef2cd3a9af0351287a929c66f58e3f6
1<!doctype html> 2<title>document.implementation.createDocument with current document's DOCTYPE</title> 3<body> 4FAIL (Script did not run); 5<script> 6document.body.textContent = "FAIL"; 7try { 8 document.implementation.createDocument(null, null, document.doctype); 9 document.body.textContent = "FAIL (no exception)"; 10} 11catch(e) { 12 if (e.code === DOMException.WRONG_DOCUMENT_ERR || e.code === DOMException.NOT_SUPPORTED_ERR) 13 document.body.textContent = "PASS"; 14 else 15 document.body.textContent = "FAIL (wrong exception: " + e.code + ")"; 16} 17</script> 18