blob: b002899c232067fc1733fa91eafe131422c49960 [file] [log] [blame]
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<script src="../../resources/js-test-pre.js"></script>
<script>
<![CDATA[
description("Test that appropriate exceptions are thrown when adding children to a ProcessingInstruction.");
var pi = document.createProcessingInstruction('target', 'data');
shouldThrow("pi.appendChild(null)", "'Error: HierarchyRequestError: DOM Exception 3'");
var div = document.createElement('div');
shouldThrow("pi.appendChild(div)", "'Error: HierarchyRequestError: DOM Exception 3'");
var textNode = document.createTextNode('sometext');
shouldThrow("pi.appendChild(textNode)", "'Error: HierarchyRequestError: DOM Exception 3'");
]]>
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>