| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <script src="../../resources/js-test-pre.js"></script> |
| 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 src="../../resources/js-test-post.js"></script> |