| <html> |
| <body> |
| <script> |
| // Start a very short speaking job that will finish quickly. |
| var u = new SpeechSynthesisUtterance("Hello, do you like my voice today?"); |
| |
| u.onstart = function(event) { |
| window.console.log("started speaking"); |
| } |
| u.onend = function(event) { |
| window.console.log("finished speaking"); |
| alert("finished speaking"); // kill this prerender |
| } |
| window.console.log("will speak"); |
| speechSynthesis.speak(u); |
| |
| window.onload = function() { |
| window.console.log("window.onload"); |
| }; |
| </script> |
| </body> |
| </html> |