| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html style="width: 100%; height: 100%"> |
| 3 <head> |
| 4 <script> |
| 5 clicksReceived = 0; |
| 6 |
| 7 function clickHandler(e) { |
| 8 var clickResult = document.getElementById("click-results"); |
| 9 clicksReceived++; |
| 10 if (clicksReceived == 1) |
| 11 clickResult.textContent = "1 click received"; |
| 12 else |
| 13 clickResult.textContent = clicksReceived + " clicks received"; |
| 14 } |
| 15 |
| 16 function getClickStatus() { |
| 17 var clickResult = document.getElementById("click-results"); |
| 18 return clickResult.textContent; |
| 19 } |
| 20 |
| 21 window.addEventListener('load', function(){ |
| 22 document.body.addEventListener('click', |
| 23 function(e){ |
| 24 clickHandler(e); |
| 25 }, false); |
| 26 }, false); |
| 27 </script> |
| 28 </head> |
| 29 |
| 30 <!-- Be sure to set 100% width/height so the test can determine an appropriate |
| 31 screen region for targeting events. --> |
| 32 <body style="width: 100%; height: 100%"> |
| 33 Page with Click Handler |
| 34 <div id="click-results">0 clicks received</div> |
| 35 </body> |
| 36 </html> |
| OLD | NEW |