1230428.html (729B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <head> 4 <meta charset="utf-8"> 5 <script type="application/javascript"> 6 function f() 7 { 8 if (speechSynthesis.getVoices().length == 0) { 9 // No synthesis backend to test this 10 document.documentElement.removeAttribute('class'); 11 return; 12 } 13 14 var s = new SpeechSynthesisUtterance("hello world"); 15 s.onerror = () => { 16 // No synthesis backend to test this 17 document.documentElement.removeAttribute('class'); 18 return; 19 } 20 s.onend = () => { 21 document.documentElement.removeAttribute('class'); 22 }; 23 speechSynthesis.speak(s); 24 speechSynthesis.cancel(); 25 speechSynthesis.pause(); 26 speechSynthesis.resume(); 27 } 28 </script> 29 </head> 30 <body onload="f();"> 31 </body> 32 </html>