selectAllChildren.htm (1017B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <title id="desc">HTML5 Selection: Call selectAllChildren() where the parameter is a text node</title> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 <script src="common.js"></script> 8 <script type="text/javascript"> 9 function RunTest() 10 { 11 var selection = window.getSelection(); 12 var div1 = document.getElementById("div1"); 13 14 checkDefaultSelectionAttributes(); 15 assert_equals(selection.toString(), ""); 16 17 selection.selectAllChildren(div1.firstChild); 18 19 checkSelectionAttributes(div1.firstChild, 0, div1.firstChild, 0, true, 1); 20 assert_equals(selection.toString(), ""); 21 } 22 </script> 23 </head> 24 <body onload="test(RunTest);"> 25 <div id="div1">Call selectAllChildren() where the parameter is a text node</div> 26 </body> 27 </html>