OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <p>Test of createContextualFragment from a Range whose container is a DocumentFr
agment. If the test succeeds you will see the word "PASS" below.</p> |
| 3 <p id="result"></p> |
| 4 <script> |
| 5 if (window.testRunner) |
| 6 testRunner.dumpAsText(); |
| 7 |
| 8 var contextFragment = document.createDocumentFragment(); |
| 9 var range = document.createRange(); |
| 10 range.setStart(contextFragment, 0); |
| 11 var fragment = range.createContextualFragment('<p id="fragment">Inserted fragmen
t</p>'); |
| 12 document.body.appendChild(fragment); |
| 13 var p = document.getElementById('fragment'); |
| 14 |
| 15 var result = document.getElementById('result'); |
| 16 result.textContent = (p && p.parentElement === document.body) ? 'PASS' : 'FAIL'; |
| 17 </script> |
| 18 |
OLD | NEW |