OLD | NEW |
(Empty) | |
| 1 <?xml version="1.0"?> |
| 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/x
html1/DTD/xhtml1-strict.dtd"> |
| 3 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 <head> |
| 5 <title>createContextualFragment from XHTML Document range.</title> |
| 6 </head> |
| 7 <body> |
| 8 <p>Test of createContextualFragment from a Range whose context is an XHTML docum
ent. If the test succeeds you will see the word "PASS" below.</p> |
| 9 <p id="result"></p> |
| 10 <script> |
| 11 if (window.testRunner) |
| 12 testRunner.dumpAsText(); |
| 13 |
| 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'); |
| 18 |
| 19 var result = document.getElementById('result'); |
| 20 result.textContent = (p && p.parentElement === document.body) ? 'PASS' :
'FAIL'; |
| 21 </script> |
| 22 </body> |
| 23 </html> |
OLD | NEW |