Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <style> | 1 <style> |
| 2 div::selection { background-color: green; } | 2 div::selection { background-color: green; } |
| 3 </style> | 3 </style> |
| 4 <div id="target" style="font-size: 16px; height: 20px; line-height: 0px;"> | 4 <div id="target" style="font-size: 16px; height: 20px; line-height: 0px;"> |
| 5 The House | 5 The House |
| 6 </div> | 6 </div> |
| 7 <script> | 7 <script> |
| 8 getSelection().setBaseAndExtent(target, 0, target, 1); | 8 // Select |The House|. |
| 9 getSelection().setBaseAndExtent(target.firstChild, 2, target.firstChild, 12) ; | |
| 9 </script> | 10 </script> |
| OLD | NEW |