blob: 02eae9fd327390c1bb30baa2175eace0797a6463 [file] [log] [blame]
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="">
<title>createContextualFragment from XHTML Document range.</title>
<p>Test of createContextualFragment from a Range whose context is an &lt;html&gt; element in an XHTML document. If the test succeeds you will see the word "PASS" below.</p>
<p id="result"></p>
if (window.testRunner)
var range = document.createRange();
var html = document.getElementsByTagName('html')[0];
range.setStart(html, 0);
var fragment = range.createContextualFragment('&lt;p id="frag">Inserted fragment&lt;/p>');
var p = document.getElementById('frag');
var result = document.getElementById('result');
result.textContent = (p &amp;&amp; p.parentElement === document.body &amp;&amp; p.namespaceURI === '') ? 'PASS' : 'FAIL';