forked from mrlan/EnglishPal
修复了bug407:划词朗读时,会结束之前的朗读,直接重新开始新的划词朗读。
parent
b9cf94da74
commit
e8b7b2e4dc
|
@ -15,6 +15,7 @@ function fillinWord(){
|
||||||
}
|
}
|
||||||
document.getElementById("text-content").addEventListener("click", fillinWord, false);
|
document.getElementById("text-content").addEventListener("click", fillinWord, false);
|
||||||
function read(s){
|
function read(s){
|
||||||
|
reader.cancel();
|
||||||
var msg = new SpeechSynthesisUtterance(s);
|
var msg = new SpeechSynthesisUtterance(s);
|
||||||
reader.speak(msg);
|
reader.speak(msg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue