336715-1.xhtml (811B)
1 <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait"> 2 <head> 3 <script> 4 <![CDATA[ 5 6 function funn() 7 { 8 var q = document.getElementById("q"); 9 10 var start1 = document.getElementById("start1"); 11 var end1 = document.getElementById("end1"); 12 13 var start2 = q; // div 14 var end2 = q.previousSibling; // text node 15 16 var r = document.createRange(); 17 r.setStart(start1, 0); 18 r.setEnd(end1, 0); 19 r.deleteContents(); 20 21 // the offsets for start2 and end2 must be the same to trigger the assertion 22 var s = document.createRange(); 23 s.setStart(start2, 0); 24 s.setEnd(end2, 0); 25 26 document.documentElement.removeAttribute("class"); 27 } 28 29 ]]> 30 </script> 31 32 </head> 33 34 <body onload="setTimeout(funn, 30)"> 35 <div id="start1"></div> 36 <div id="t">X<div id="q">Y</div></div> 37 <div id="end1"></div> 38 </body> 39 40 </html>