OLD | NEW |
1 <head> | 1 <head> |
2 <script type="text/javascript" charset="utf-8"> | 2 <script type="text/javascript" charset="utf-8"> |
3 function runTest() | 3 function runTest() |
4 { | 4 { |
5 var target = document.getElementById("target"); | 5 var target = document.getElementById("target"); |
6 getSelection().setBaseAndExtent(target, 0, target.nextSibling, 1); | 6 getSelection().setBaseAndExtent(target, 0, target.nextSibling, 1); |
7 } | 7 } |
8 </script> | 8 </script> |
9 <style> | 9 <style> |
10 #target::selection { background-color: #0f0; } | 10 #target::selection { background-color: #0f0; } |
11 </style> | 11 </style> |
12 </head> | 12 </head> |
13 <body onload="runTest()"> | 13 <body onload="runTest()"> |
14 <div style="-webkit-transform: translateZ(0); margin-top: 50px; margin-left:
50px;"> | 14 <div style="transform: translateZ(0); margin-top: 50px; margin-left: 50px;"> |
15 <div id="target" style="background-color: red; width: 100px; height: 100
px; position: absolute;"><br></div>a | 15 <div id="target" style="background-color: red; width: 100px; height: 100
px; position: absolute;"><br></div>a |
16 </div> | 16 </div> |
17 <script> | 17 <script> |
18 </script> | 18 </script> |
19 </body> | 19 </body> |
OLD | NEW |