336081-1.xhtml (1210B)
1 <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait"> 2 <head> 3 <script> 4 <![CDATA[ 5 6 function foop(targetWindow) 7 { 8 var targetDocument = targetWindow.document; 9 10 var r1 = targetDocument.createRange(); 11 r1.setStart(targetDocument.getElementById("out1"), 0); 12 r1.setEnd (targetDocument.getElementById("out2"), 0); 13 targetWindow.getSelection().addRange(r1); 14 15 var r2 = targetDocument.createRange(); 16 r2.setStart(targetDocument.getElementById("in1"), 0); 17 r2.setEnd (targetDocument.getElementById("in2"), 0); 18 targetWindow.getSelection().addRange(r2); 19 20 targetDocument.execCommand('removeformat', false, null); 21 targetDocument.execCommand('outdent', false, null); 22 } 23 24 function init() 25 { 26 setTimeout(function() 27 { 28 var fd = window.frames[0].document; 29 fd.body.appendChild(fd.importNode(document.getElementById('rootish'), true)); 30 fd.designMode = 'on'; 31 foop(window.frames[0]); 32 document.documentElement.removeAttribute("class"); 33 }, 100); 34 } 35 36 ]]> 37 </script> 38 </head> 39 40 <body onload="init()"> 41 42 <iframe srcdoc="<html></html>" style="width: 95%; height: 500px;"/> 43 44 <div id="rootish"> 45 <div id="out1"/> 46 <div id="in1"/> 47 <div id="in2"/> 48 <div id="out2"/> 49 </div> 50 51 </body> 52 </html>