| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 1 <html> | 
|  | 2   <head> | 
|  | 3     <title>Speech input test</title> | 
|  | 4     <script type="text/javascript"> | 
|  | 5       function onspeechresult(value) { | 
|  | 6         if (value == "Pictures of the moon") { | 
|  | 7           document.getElementById('status').innerHTML = 'PASS'; | 
|  | 8           document.location = '#pass'; | 
|  | 9         } else { | 
|  | 10           document.location = '#fail'; | 
|  | 11         } | 
|  | 12       } | 
|  | 13       function run() { | 
|  | 14         // Send a click to the right corner of the input field where the speech | 
|  | 15         // button is rendered. | 
|  | 16         var inputField = document.getElementById('inputField'); | 
|  | 17         var evt = document.createEvent('MouseEvents'); | 
|  | 18         evt.initMouseEvent('click', true, true, window, | 
|  | 19                            0, 0, 0, | 
|  | 20                            inputField.offsetWidth - 4, 4, | 
|  | 21                            false, false, false, false, 0, null); | 
|  | 22         inputField.dispatchEvent(evt); | 
|  | 23       } | 
|  | 24     </script> | 
|  | 25   </head> | 
|  | 26   <body onLoad="run()"> | 
|  | 27     <input id='inputField' speech onchange="onspeechresult(this.value);"><br> | 
|  | 28     <div id="status">FAIL</div> | 
|  | 29   </body> | 
|  | 30 </html> | 
| OLD | NEW | 
|---|