blob: d3a2abb06731d0eab58c37bc73f2e32170fb0416 [file] [log] [blame]
<!DOCTYPE html>
<p>Test of createContextualFragment from a Range whose context is an &lt;html&gt; element. 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('<p id="fragment">Inserted fragment</p>');
var p = document.getElementById('fragment');
var result = document.getElementById('result');
result.textContent = (p && p.parentElement === document.body && p.namespaceURI === '') ? 'PASS' : 'FAIL';