2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml">
5 <title>createContextualFragment from
<html
> element range in XHTML document.
</title>
8 <p>Test of createContextualFragment from a Range whose context is an XHTML document. If the test succeeds you will see the word
"PASS" below.
</p>
11 if (window.testRunner)
12 testRunner.dumpAsText();
14 var range = document.createRange();
15 var fragment = range.createContextualFragment('
<p
id=
"frag">Inserted fragment
</p
>');
16 document.body.appendChild(fragment);
17 var p = document.getElementById('frag');
19 var result = document.getElementById('result');
20 result.textContent = (p
&& p.parentElement === document.body
&& p.namespaceURI === 'http://www.w3.org/
1999/xhtml') ? 'PASS' : 'FAIL';