| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <title>hover effect on a link in the 2nd region</title> | |
| 5 <style> | |
| 6 .content { | |
| 7 font-size: 20px; | |
| 8 font-family: Verdana; | |
| 9 } | |
| 10 .content a:hover { | |
| 11 color:Green; | |
| 12 } | |
| 13 #region { | |
| 14 width: 100px; | |
| 15 height: 100px; | |
| 16 background-color: rgb(241, 241, 241); | |
| 17 border: solid 1px #888; | |
| 18 margin: 10px; | |
| 19 } | |
| 20 </style> | |
| 21 <script> | |
| 22 function myOnLoad() { | |
| 23 if(!window.testRunner) | |
| 24 return; | |
| 25 | |
| 26 var element = document.querySelector('.content a
'); | |
| 27 var box = element.getBoundingClientRect(); | |
| 28 var X = (box.right + box.left) / 2; | |
| 29 var Y = (box.top + box.bottom) / 2; | |
| 30 | |
| 31 eventSender.mouseMoveTo(X, Y); | |
| 32 } | |
| 33 </script> | |
| 34 </head> | |
| 35 <body onload="myOnLoad();"> | |
| 36 <div id="region"><div class="content">1xxxxx<br>2xxxxx<br>3xxxxx
<br>4xxxxx</div></div> | |
| 37 <div id="region"><div class="content">5xxxxx<br>6xxxxx<br><a hre
f="#">7xx</a>xxx<br>8xxxxx</div></div> | |
| 38 <div id="region"><div class="content">9xxxxx<br>10xxxxx<br>11xxx
xx</div></div> | |
| 39 <div>hover effect on a link in the 2nd region</div> | |
| 40 </body> | |
| 41 </html> | |
| OLD | NEW |