| OLD | NEW |
| 1 <head> | 1 <head> |
| 2 <style> | 2 <style> |
| 3 ::selection { background-color: red; } | 3 ::selection { background-color: red; } |
| 4 </style> | 4 </style> |
| 5 <script type="text/javascript" charset="utf-8"> | 5 <script type="text/javascript" charset="utf-8"> |
| 6 function runTest() | 6 function runTest() |
| 7 { | 7 { |
| 8 sel.empty(); | 8 sel.empty(); |
| 9 } | 9 } |
| 10 </script> | 10 </script> |
| 11 </head> | 11 </head> |
| 12 <body onload="runTest()"> | 12 <body onload="runTest()"> |
| 13 <table><tr><td style="width: 100px; height: 100px;"></td></tr><tr><td style="bac
kground-color: green;"> <div id="target" style="display: inline-block; heig
ht: 100px; width: 10px;"></div></td></tr></table> | 13 <table><tr><td style="width: 100px; height: 100px;"></td></tr><tr><td style="bac
kground-color: green;"> <div id="target" style="display: inline-block; heig
ht: 100px; width: 10px;"></div></td></tr></table> |
| 14 <script> | 14 <script> |
| 15 var sel = getSelection(); | 15 var sel = getSelection(); |
| 16 var target = document.getElementById("target"); | 16 var target = document.getElementById("target"); |
| 17 | 17 |
| 18 sel.setBaseAndExtent(target.previousSibling, 1, target.parentElement.parentE
lement, 1); | 18 sel.setBaseAndExtent(target.previousSibling, 1, target.parentElement.parentE
lement, 1); |
| 19 document.body.offsetTop; | 19 document.body.offsetTop; |
| 20 </script> | 20 </script> |
| OLD | NEW |